O'Reilly logo

Microsoft® Visual J#™ .NET (Core Reference) by John/Longshaw, Andy Sharp

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

Integrating .NET Components into COM

In addition to calling COM components from managed space, you can expose .NET components to unmanaged code using COM Interop. To do this, you must create a COM Callable Wrapper (CCW) for your managed component. Like an RCW, the CCW hides the differences between the .NET model and COM, making the .NET component appear as a regular COM component to COM clients. A COM client activates and accesses a .NET component through a CCW in the same way as it would use any other COM component.

A CCW is a nontrivial piece of code. It has to create and manage a .NET component on behalf of a COM client, keeping track of the number of references and arranging for the .NET component to be garbage collected when the last reference ...

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