//
archives

CLR

This category contains 3 posts

RCW Internal Reference Count

1. Introduction. 1.1 The Runtime Callable Wrapper (RCW) is used to represent a COM object in the managed world. Internally a RCW contains a reference count on the COM object that it wraps. 1.2 Note that this reference count is not equivalent to the well-known COM reference count. The COM reference count is held within the … Continue reading

Invoking Finalizers of .NET-based COM Objects in an Unmanaged App Part 1

1. Introduction. 1.1 .NET objects, when exposed as COM objects in an unmanaged application, face a tricky problem : their finalizers are often not invoked throughout the application’s lifetime. 1.2 For more information on finalizers in general and the limitation that we have just mentioned above, please refer to : Object.Finalize Method on MSDN. 1.3 This … Continue reading

Research Topic : Hidden COM Callable Wrapper.

1. Introduction. 1.1 Recently, someone from the MSDN forum presented a very interesting question. 1.2 He wrote a simple C# class which is COM exported. When he instantiated one such a managed class in an unmanaged C++ application, he noticed that there were two COM-Callable Wrappers created in the application. One for the exported C# class … Continue reading