Summary

In this chapter, you have learned the basics of the .NET architecture. You learned some of the limitations in COM and why Microsoft has created the new architecture. A number of languages are being written to support the new architecture. These languages compile to a processor-independent form of assembly language known as Intermediate Language (IL). Two of the main languages for .NET are VB.NET and C#. Both of these compilers generate IL. When you run a program written in IL, a Just-in-Time compiler converts the code into native machine code.

VB.NET has a number of enhancements over VB 6. Among them are: code inheritance, method overloading, enhanced user-defined types, function pointers, parameterized constructors, and true exception handling.

.NET components follow a different versioning scheme than COM+. When you build an assembly that references another assembly, the client assembly’s manifest contains the version number of the referenced assembly. The runtime matches the major and minor numbers in the version for the assembly. You can redirect the runtime to use a different version with a configuration file.

To use an assembly from a VB 6 program, you use a tool called RegAsm.exe. Alternatively, you can use the tlbexp.exe tool to create a type library. However, RegAsm.exe does the job of adding keys to the registry to make the public classes in the assembly creatable from COM. It also builds a type library and registers it. In addition to providing you with a way to use ...

Get COM+ Programming with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.