NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

COM Callable Wrappers (CCW)

During the activation process, the runtime instantiates the object as well as a COM callable wrapper (CCW) for the object. The object is allocated from the garbage-collected heap while the CCW is allocated from a non-collected heap. This ensures that the runtime is free to move the object around in memory as necessary. The wrapper holds a single reference to the object in order to keep the object alive as long as the wrapper is in use. Since the wrapper is allocated in non-collected memory, the runtime is free to hand out interface pointers on the wrapper to the unmanaged client. The wrapper is reference counted like any other COM object. When the reference count reaches zero, the wrapper releases its sole reference on the object and the object is freed during the next garbage collection.

The CCW has the following responsibilities: