FIX: OleAut32.dll Is Unregistered Incorrectly

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

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 that this is a problem in the Microsoft products that are listed at the beginning of this article.

This problem was corrected in WindowsNT 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.

Properties

Article ID: 185599 - Last Review: October 3, 2003 - Revision: 2.0
APPLIES TO
  • Microsoft OLE 4.0
  • Microsoft OLE 4.0
  • Microsoft OLE 4.0
  • Microsoft OLE 4.0
Keywords: 
kbautomation kbbug kbfix kboswin2000fix kboswinnt400sp4fix KB185599
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

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