Using Types from the .NET Framework Class Library

The .NET Framework class library contains a rich set of classes, some of which have no analog in the various unmanaged class libraries that are available to programmers on Microsoft platforms, such as MFC, ATL, and the Visual Basic runtime. Unfortunately, many of these classes are invisible to COM.

Note

I was disappointed to find that the very useful and well-designed regular expression classes in the System.Text.RegularExpression namespace are COM invisible. I really wanted to use them as my demonstration for this section.

For the classes that are visible, you have three ways to use them from an unmanaged application: (1) You can register the assembly that contains the class, (2) you can call ...

Get .NET and COM Interoperability Handbook, The 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.