//
archives

singleton

This tag is associated with 3 posts

The STA Singleton COM Object – Problems and Solutions Part 2.

1. Introduction. 1.1 In part 1 of this series of articles, I explained the problem associated with a COM singleton coclass which is housed in an in-proc server (i.e. a DLL). 1.2 The way the COM sub-system instantiate coclasses is such that a singleton STA object can be legitimately accessed from multiple threads concurrently despite the built-in windows-message-based … Continue reading

The STA Singleton COM Object – Problems and Solutions Part 1.

1. Introduction. 1.1 Singleton COM objects are guarenteed to be the only instances of coclasses. 1.2 However, what about their apartment ? Do they always run in the same apartment ? The answer depends on the apartment model that they use. 1.3 For MTA singleton objects : yes. They will always run in the one and only … Continue reading

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