Q228487: PRB: System Error Message "&H80004015" Running ActiveX DLL in ID

Article: Q228487
Product(s): Microsoft Visual Basic for Windows
Version(s): 5.0,6.0
Operating System(s): 
Keyword(s): kbole kbActiveX kbInprocSvr kbRegistry kbVBp500 kbVBp600 kbGrpDSVB kbDSupport
Last Modified: 10-MAY-2001

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual Basic Learning Edition for Windows, versions 5.0, 6.0 
- Microsoft Visual Basic Professional Edition for Windows, versions 5.0, 6.0 
- Microsoft Visual Basic Enterprise Edition for Windows, versions 5.0, 6.0 
-------------------------------------------------------------------------------

SYMPTOMS
========

While attempting to run an ActiveX dll from the Visual Basic IDE, the following
error message is displayed:

  System error &H80004015(-2147467243). The class is configured to run as a
  security ID different from the caller.

CAUSE
=====

When Visual Basic runs an ActiveX dll from the IDE, it calls the
CoRegisterClassObject API to temporarily register the server. This creates the
AppId and specifies it to run in the Interactive User context.

The problem is due to a bug in the Microsoft OLE Libraries 4.0, which are
included with the Microsoft Platform Software Development Kit (SDK).
CoRegisterClassObject fails with the error message given earlier under the
following conditions:

- If the ActiveX server calling the API is set to run using the "Interactive
  User" identity.

-and-

- The string associated with the following registry key contains any value
  other than a single valid executable name for the shell process:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon Shell=

Under Windows 2000, this error occurs when the Certificate Authority service does
not start.

RESOLUTION
==========

Make certain that the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\Winlogon Shell= registry key contains a single valid
executable name for the shell process.

To resolve this problem under Windows 2000, you can install the "Client for
Microsoft Network" component and then reboot.


See the "REFERENCES" section of this article for instructions on how to handle
this error when it is related to the Certificate Authority on systems that are
running Windows 2000.

REFERENCES
==========

For additional information, click the article number below to view the article
in the Microsoft Knowledge Base:

  Q170364 CoRegisterClassObject Fails with CO_E_WRONG_SERVER_IDENTITY

Additional query words:

======================================================================
Keywords          : kbole kbActiveX kbInprocSvr kbRegistry kbVBp500 kbVBp600 kbGrpDSVB kbDSupport 
Technology        : kbVBSearch kbAudDeveloper kbZNotKeyword6 kbZNotKeyword2 kbVB500Search kbVB600Search kbVBA500 kbVBA600 kbVB500 kbVB600
Version           : :5.0,6.0
Issue type        : kbprb

=============================================================================