OOPortal OOPortal


Basic COM   «Prev 

Structural View of a COM server

The relationship of COM servers, class factories, COM objects, and interfaces can be viewed as a containment relationship. A server contains one class factory for each COM class (i.e., type of COM object) that it implements. Each instance of a COM object contains one or more COM interfaces. And each COM interface contains three or more COM methods (i.e., IUnknown plus other methods). The following diagram depicts these relationships.

Containment relationship

Component Services Explorer

The Component Services Explorer gives you visual feedback when a server applicat ion is running: the application icon and the active components will be spinning. Library applications will have no visual feedback when they are running in a client process, even if that process is another COM+ server application. Expand the COM+ Applications folder and select the Status View on the Component Services Explorer toolbar (the button at the far right end of the toolbar;) .
The Component Services Explorer will display the process ID of the running server applications. Record the process ID for the Hello COM+ application. Next, bring up Windows Task Manager and locate the process with a matching ID. Its image name will be dllhost .exe.
The first CoCreateInstance( ) request for a component in a server application creates a new dllhost process, to host components from that application only. Subsequent CoCreateInstance( ) calls to objects from the same application create new objects in the existing dllhost instance. Unlike classic COM, there is no way to create each object in its own process. No COM+ equivalent to the COM call you make to
CoRegisterClassObject (...REGCLS_SINGLEUSE...) 
exists.