DCOM Clients Cannot Create Objects


Distributed Component Object Model (DCOM) client programs that run inside Terminal Server sessions other than the console cannot create objects of classes implemented inside DCOM servers running as Terminal Server services.

You may also receive occurrences of event ID 10010 from DCOM in the Event Viewer with the following description:
The server <clsid> did not register with DCOM within the required timeout.
You may also receive the following error message:
CoGetClassObject failed - Server Execution failed CO_E_SERVER_EXEC_FAILURE 0x80080005


This behavior is because those object classes are considered as user globals by DCOM and Terminal Server.

However, DCOM and Terminal Server provide the ability to register DCOM classes as system globals. But, in the case of classes implemented in services, they should be considered as system globals, unless they had been explicitly registered as user globals.


Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows

To explicitly register a DCOM class as a system global, use the following steps:

  1. If it does not exist, create the following registry key:
    HKLM\Software\Microsoft\Windows NT\CurrentVersion\Terminal Server\Compatibility\CLSID
  2. Create a subkey with {CLSID} as its name, where the CLSID is the class identifier of the DCOM class that is to be a system global. For example, a subkey would be:
  3. Under the above subkey, create fSystemGlobalClass as the value name with a REG_DWORD type and set its value data to 1.
Or, you can upgrade to Microsoft Windows 2000 Server with Terminal Services, which does not have the same restriction.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

More Information

To reproduce this, use the DCOM sample named "ATLDRAW" provided with the ActiveX Template Library (ATL).