BUG: COM Component Is Not Initialized When You Specify Explicit Path to DllHost.exe as Surrogate

Article translations Article translations
Article ID: 253854 - View products that this article applies to.
This article was previously published under Q253854
Expand all | Collapse all

SYMPTOMS

When you explicitly set the path to DllHost.exe as the surrogate for a Component Object Model (COM) component, you may receive the following error message when you try to instantiate the component:
CoGetClassObject failed
Server Execution failed
CO_E_SERVER_EXEC_FAILURE (0x80080005)
The following error is logged in the event log:
The server <clsid> did not register with DCOM within the required timeout.

RESOLUTION

Instead of explicitly specifying the path to DllHost.exe, leave the path NULL. You can do this with the OleView tool by performing the following steps:
  1. Start OleView. To do this, click Start, point to Programs, point to Microsoft Visual Studio 6.0, point to Microsoft Visual Studio 6.0 Tools, and then click OleView.
  2. In the left window pane of OleView, expand the Object Classes root item of the tree control. Under the All Objects item, select your COM component.
  3. Click the Implementation tab for the COM component found in the right window pane. Click to select the Use Surrogate Process check box, and leave the Path to the Customer Surrogate text box blank.
  4. Select the Registry tab in the right window pane. By selecting the Registry tab, the changes that you made in step 3 are committed to the registry, and you should see the DllSurrogate named value under the AppID entry in the Registry tab window. The DllSurrogate entry shown in the window will have a NULL value.
By configuring the DllSurrogate named value to have a NULL value, the COM component will run under the System Surrogate DllHost.exe.

STATUS

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

MORE INFORMATION

Steps to Reproduce Behavior

  1. Register a COM dynamic-link library (DLL).
  2. Start OleView. To do this, click Start, point to Programs, point to Microsoft Visual Studio 6.0, point to Microsoft Visual Studio 6.0 Tools, and then click OleView.
  3. In the left window pane of OleView, expand the Object Classes root item of the tree control. Under the All Objects item, select your COM component.
  4. In the Object menu, set the CoCreateInstance flags to CLSCTX_LOCAL_SERVER.
  5. Click the Implementation tab for the COM component found in the right window pane, and then click to select the Use Surrogate Process check box.
  6. In the Path to Custom Surrogate text box, specify the path explicitly as %SystemRoot%\System32\DllHost.exe.
  7. Right-click the COM component selected in the left window pane and click Create Instance. You receive the error shown in the "Symptoms" section of this article.

Properties

Article ID: 253854 - Last Review: October 23, 2003 - Revision: 3.2
APPLIES TO
  • Microsoft COM+ 2.0 Standard Edition, when used with:
    • the operating system: Microsoft Windows 2000
Keywords: 
kbbug kbdcom kbdll kbpending KB253854

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com