Accessing C# Components from Unmanaged Code

There might be situations where existing COM-based applications might need to access new .NET components. The COM-based applications might require the new functionality provided by the .NET components. Such COM-based applications are said to be written using unmanaged code, because they are not managed by the Common Language Runtime.

This is where the RegAsm.exe utility, also referred to as the Assembly Registration utility, is used. Typically, when an unmanaged application tries to instantiate a COM object, the COM services search for information about the COM object in the registry. Similarly, when the COM-based application has to access a .NET component, the application requires the corresponding ...

Get Special Edition Using C# 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.