
Singleton not a singleton?
Background:
CtspData.exe is a LOCAL_SERVER COM server that serves one object: Param, a
singleton COM object that implements an outgoing interface,
_IParamEvents. It also implements a dispatch interface, IParam, that
has two methods that simply fire events on the outgoing interface.
My problem only occurs when another LOCAL_SERVER, CtspDispMapBroker.exe
creates an instance of Param and connects to its outgoing interface
_IParamEvents. Afterward, when my service starts CtspData to
create a reference to Param (via CoCreateInstance), for some unknown
reason, a new process is created (there are 2 CtspData.exe instances
viewablefrom Taskmgr.exe) and events fired on the
outgoing interface (_IParamEvents) are NOT recieved by CtspDispMapBroker.
However, If my service creates the Param object first, all is OK:
There is only ONE instance of the process CtspData.exe and events are
received by CtspDispMapBroker.
Is this a bug or a design characteristic? Any help is greatly
appreciated...
Alex