PRB: Ccdist.exe Fails to Register Comcat.dll Until Reboot

ID: Q163958


The information in this article applies to:


SYMPTOMS

Attempting to register a component using RegSvr32.exe or via self- registration using DllRegisterServer() fails when the control uses the component category API.


CAUSE

The problem is due to the self-extracting executable Ccdist.exe that installs the component category DLL but fails to register the component in the system registry until the user reboots the machine.


MORE INFORMATION

Component Categories help identify areas of functionality that an OLE component may support. Applications or components that take advantage of this functionality may redistribute the self-extracting executable, Ccdist.exe, from the Win32 SDK. Ccdist.exe then installs the necessary component categories DLL, Comcat.dll.

Typically, when a redistributable file is distributed as a self-extracting executable, it copies the files to the designated directory in the system and makes the appropriate registry entries. The problem with Ccdist.exe is that it installs Comcat.dll into the system, but fails to register it, until the user reboots the machine. This is due to a limitation in the tool Microsoft used to create the self-extracting Ccdist.exe, where registration happens only on reboot.

Before a component can call any of the ICatRegister functions to register and unregister component category information in the registry, it must first instantiate the component category manager by calling CoCreateInstance (CLSID_StdComponentCategoriesMgr,...). This CoCreateInstance() call fails because although the Comcat.dll is present in the system, it was not registered correctly.

The workaround is to either reboot after installing the DLL, or to call "RegSvr32 ComCat.DLL" after running Ccdist.exe.

© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Lanie Kurata, Microsoft Corporation

Additional query words: 1.00


Keywords          : AXSDKControls 
Version           : 1.00
Platform          : WINDOWS 
Issue type        : 

Last Reviewed: May 3, 1999