Object Life-Cycle Implications
When you are using a managed code object from a COM/Win32 client, you face a mismatch between the life-cycle scheme that the client uses and expects and the life cycle that the underlying object uses. As you already learned in Chapter 6, the CCW exposes a managed object to unmanaged consumers so that it appears for all intents and purposes to be like any other COM object. The CCW synthesizes an implementation of system-level interfaces like IUnknown, IDispatch, and ISupportsErrorInfo. The CCW exposes COM equivalents of any managed interfaces that the managed class supports, and it may also expose a class interface that exposes all of the public methods implemented by the class. All of these interfaces exposed by ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access