BUG: OleAut32.dll Is Unregistered Incorrectly

ID: Q185599

The information in this article applies to:

SYMPTOMS

The OLE Automation CLSIDs, such as PSOAInterface {00020424-0000-0000-C000- 000000000046}, are missing the InprocServer32 key and OLE automation might not work. For example, instantiating an automation object and requesting a dual or dispatch based interface.

CAUSE

A COM component that contains MIDL-generated proxy-stub code and a type library has been unregistered.

A MIDL-generated proxy-stub DLL includes an implementation of DllUnregisterServer that attempts to clean up the registry entries for all interfaces supported by the DLL. If one of these interfaces is using OleAut32.dll as the proxy-stub, OleAut32.dll will be unregistered when the proxy-stub DLL is unregistered.

RESOLUTION

First, make sure that the PSOAInterface CLSID key has an InprocServer32 subkey that points to OleAut32.dll in the Windows system directory.

Following is an example of a .reg file that would register the PSOAInterface CLSID key and InprocServer32 subkey:

   REGEDIT4

   [HKEY_CLASSES_ROOT\CLSID\{00020424-0000-0000-C000-000000000046}]
   @="PSOAInterface"

   [HKEY_CLASSES_ROOT\CLSID\{00020424-0000-0000-C000-
   000000000046}\InprocServer]
   @="ole2disp.dll"

   [HKEY_CLASSES_ROOT\CLSID\{00020424-0000-0000-C000-
   000000000046}\InprocServer32]
   @="oleaut32.dll"
   "ThreadingModel"="Both"

Next, re-register OleAut32.dll by using the following command:

   regsvr32 oleaut32.dll

STATUS

Microsoft is continuing to investigate whether there are any other scenarios that trigger this problem, and whether there are Microsoft- supplied components that fall into the problematic scenarios. We will post the recommended workarounds for components that can be modified soon. We are also working on a system-level fix that will resolve the problem without modifying problematic components. More information will be posted when it is available.

MORE INFORMATION

MIDL-generated proxy-stub DLLs include an implemention of DllUnregisterServer. This implementation locates the ProxyStubClsid32 entry for each registered interface supported by a DLL and removes registry keys associated with those CLSIDs. DllUnregisterServer does not check that the ProxyStubClsid32 entries are implemented by the proxy-stub DLL. Thus, the OleAut32.dll proxy-stub entry is incorrectly removed.

This can occur when a component DLL contains both a type library and a MIDL- generated proxy-stub. When the type library is registered, OleAut32.dll is used as the proxy-stub dll for those interfaces in the type library.

Additional query words: kbDSupport kbdss kbNoKeyword Issue type : kbbug

Last Reviewed: October 15, 1998