FIX: OleAut32.dll Is Unregistered Incorrectly

ID: Q185599


The information in this article applies to:
  • Microsoft OLE Libraries, versions 3.1, 3.5, 3.51, 4.0


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 has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

This problem was corrected in Windows NT 4.0 Service Pack 4 , dcom95 1.2 and Windows 2000.


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 kbbuglist

Keywords : kbole kbAutomation kbWinOS2000fix kbNTOS400sp4fix kbGrpCom kbDSupport
Version : :3.1,3.5,3.51,4.0
Platform :
Issue type : kbbug


Last Reviewed: October 26, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.