O'Reilly logo

.NET Common Language Runtime Unleashed by Kevin Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unmanaged to Managed Interop Basics

Every unmanaged object is potentially a COM object. When managed code needs to access unmanaged code in the form of a COM component, the type library needs to be converted to assembly metadata information. This assembly metadata is used to form a Runtime Callable Wrapper (RCW) that handles marshaling, error conversion, and lifetime management. For unmanaged code to access a managed COM component, the assembly metadata needs to be converted into type library information. In addition, the registry needs to be modified appropriately to support the .NET component. All of this sets up the framework for building another wrapper component known as a COM Callable Wrapper (CCW). The CCW is illustrated in Figure 9.1 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required