您的位置:首页 > Web前端

System error &H80004015 - This class is configured to run as a security id different from the caller.

2006-11-12 20:31 751 查看
 

[align=left]System error &H80004015 activex/dll VB IDE[/align]
[align=left]Pedro Silva posted at 31-Jan-06 10:38[/align]
[align=left]When I run my program I get a Compile time, [/align]
[align=left]System error &H80004015 - This class is configured to run as a security id different from the caller. [/align]
[align=left] [/align]
[align=left]It happens when i try to debug a activex/dll inside vb ide. Can some one help me? [/align]
[align=left] [/align]
[align=left]I already checked the msdn document, but the problem persist. [/align]
[align=left] [/align]
[align=left]I have: [/align]
[align=left]VB6 SP6 [/align]
[align=left]XP SP2[/align]
[align=left]Still have the prob - even using a blank dll[/align]
[align=left]Pedro Silva replied at 01-Feb-06 05:39[/align]
[align=left]I still have the problem. The problem happens even if I do this:[/align]
[align=left]-I start VB 6 (SP6); [/align]
[align=left]-I choose to create a new "ActiveX DLL";[/align]
[align=left]-I create a [/align]
[align=left]Sub foo()[/align]
[align=left] [/align]
[align=left]End Sub[/align]
[align=left]- Press F5 to Run[/align]
[align=left]- In "Project Properties - Debugging" I select (Wait for components to be created) - The problem happens with all the options anyway[/align]
[align=left]- I press OK[/align]
[align=left]- Then I have the error "System Error &H80004015 (-2147467243).[/align]
[align=left] [/align]
[align=left]!![/align]
[align=left] [/align]
[align=left]I've checked the MSDN article http://support.microsoft.com/default.aspx?scid=kb;en-us;228487[/align]
[align=left]but it doesn't help me.[/align]
[align=left] [/align]
[align=left]I have my registry ok, just as it should be:[/align]
[align=left]I have [/align]
[align=left]Explorer.exe [/align]
[align=left]in HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion/Winlogon Shell[/align]
[align=left] [/align]
[align=left]What can I do?[/align]
[align=left]Thanks for your suggestion anyway.[/align]
[align=left]System error &H80004015 activex/dll VB IDE[/align]
[align=left]John Conway replied at 31-Jan-06 09:28[/align]
[align=left]SYMPTOMS:[/align]
[align=left]CAUSE:[/align]
[align=left]RESOLUTION:[/align]
[align=left] [/align]
[align=left]http://support.microsoft.com/default.aspx?scid=kb;en-us;228487[/align]
[align=left] [/align]
[align=left] [/align]
[align=left]----------------------------------------------------------------------------------------------------[/align]
[align=left]I looked in the location ( HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion/Winlogon Shell=) that is suggested in the article you see above. [/align]
[align=left] [/align]
[align=left]It's suggest a single valid .exe name for the shell process. This is what I'd found after going into the regedit and to the location specified in HKEY_lOCAL_MACHINE........[/align]
[align=left]--------------------------------------------------------------------------------------------------[/align]
[align=left]You'll see 3 columns: Name, Type, Data[/align]
[align=left] [/align]
[align=left]I have:[/align]
[align=left]Name:Shell, Type:REG_SZ, Data:Explorer.exe[/align]
[align=left]Still happens[/align]
[align=left]Pedro Silva replied at 01-Feb-06 05:40[/align]
[align=left]I still have the problem. The problem happens even if I do this:[/align]
[align=left]-I start VB 6 (SP6); [/align]
[align=left]-I choose to create a new "ActiveX DLL";[/align]
[align=left]-I create a [/align]
[align=left]Sub foo()[/align]
[align=left] [/align]
[align=left]End Sub[/align]
[align=left]- Press F5 to Run[/align]
[align=left]- In "Project Properties - Debugging" I select (Wait for components to be created) - The problem happens with all the options anyway[/align]
[align=left]- I press OK[/align]
[align=left]- Then I have the error "System Error &H80004015 (-2147467243).[/align]
[align=left] [/align]
[align=left]!![/align]
[align=left] [/align]
[align=left]I've checked the MSDN article http://support.microsoft.com/default.aspx?scid=kb;en-us;228487[/align]
[align=left]but it doesn't help me.[/align]
[align=left] [/align]
[align=left]I have my registry ok, just as it should be:[/align]
[align=left]I have [/align]
[align=left]Explorer.exe [/align]
[align=left]in HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion/Winlogon Shell[/align]
[align=left] [/align]
[align=left]What can I do?[/align]
[align=left]Thanks for your suggestion anyway.[/align]
[align=left]Still happens[/align]
[align=left]John Conway replied at 01-Feb-06 10:46[/align]
[align=left]Puzzled. [/align]
[align=left]---------------------------------------------------------[/align]
[align=left]Tutorial for ActiveX:[/align]
[align=left]http://www.developer.com/net/vb/article.php/1539541[/align]
[align=left] [/align]
[align=left]------------------------------[/align]
[align=left] Are you working on a fresh project? ---a project from school?---a project on the net?[/align]
[align=left] Have you tried a fresh download of SP6 or checked for needed updates? ---[/align]
[align=left]Problem Solved[/align]
[align=left]Pedro Silva replied at 02-Feb-06 05:44[/align]
[align=left]The problem was solved!!![/align]
[align=left] [/align]
[align=left]I had some registry keys missing.[/align]
[align=left] [/align]
[align=left]Now I have: (just copy this text, save it as something.reg and doubleclick it to enter these keys into registry):[/align]
[align=left] [/align]
[align=left]Windows Registry Editor Version 5.00[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify][/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/crypt32chain][/align]
[align=left]"Asynchronous"=dword:00000000[/align]
[align=left]"Impersonate"=dword:00000000[/align]
[align=left]"DllName"=hex(2):63,00,72,00,79,00,70,00,74,00,33,00,32,00,2e,00,64,00,6c,00,/[/align]
[align=left] 6c,00,00,00[/align]
[align=left]"Logoff"="ChainWlxLogoffEvent"[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/cryptnet][/align]
[align=left]"Asynchronous"=dword:00000000[/align]
[align=left]"Impersonate"=dword:00000000[/align]
[align=left]"DllName"=hex(2):63,00,72,00,79,00,70,00,74,00,6e,00,65,00,74,00,2e,00,64,00,/[/align]
[align=left] 6c,00,6c,00,00,00[/align]
[align=left]"Logoff"="CryptnetWlxLogoffEvent"[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/cscdll][/align]
[align=left]"DLLName"="cscdll.dll"[/align]
[align=left]"Logon"="WinlogonLogonEvent"[/align]
[align=left]"Logoff"="WinlogonLogoffEvent"[/align]
[align=left]"ScreenSaver"="WinlogonScreenSaverEvent"[/align]
[align=left]"Startup"="WinlogonStartupEvent"[/align]
[align=left]"Shutdown"="WinlogonShutdownEvent"[/align]
[align=left]"StartShell"="WinlogonStartShellEvent"[/align]
[align=left]"Impersonate"=dword:00000000[/align]
[align=left]"Asynchronous"=dword:00000001[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/NavLogon][/align]
[align=left]"Logoff"="NavLogoffEvent"[/align]
[align=left]"DllName"="C://WINDOWS//system32//NavLogon.dll"[/align]
[align=left]"StartShell"="NavStartShellEvent"[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/ScCertProp][/align]
[align=left]"DLLName"="wlnotify.dll"[/align]
[align=left]"Logon"="SCardStartCertProp"[/align]
[align=left]"Logoff"="SCardStopCertProp"[/align]
[align=left]"Lock"="SCardSuspendCertProp"[/align]
[align=left]"Unlock"="SCardResumeCertProp"[/align]
[align=left]"Enabled"=dword:00000001[/align]
[align=left]"Impersonate"=dword:00000001[/align]
[align=left]"Asynchronous"=dword:00000001[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/Schedule][/align]
[align=left]"Asynchronous"=dword:00000000[/align]
[align=left]"DllName"=hex(2):77,00,6c,00,6e,00,6f,00,74,00,69,00,66,00,79,00,2e,00,64,00,/[/align]
[align=left] 6c,00,6c,00,00,00[/align]
[align=left]"Impersonate"=dword:00000000[/align]
[align=left]"StartShell"="SchedStartShell"[/align]
[align=left]"Logoff"="SchedEventLogOff"[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/sclgntfy][/align]
[align=left]"Logoff"="WLEventLogoff"[/align]
[align=left]"Impersonate"=dword:00000000[/align]
[align=left]"Asynchronous"=dword:00000001[/align]
[align=left]"DllName"=hex(2):73,00,63,00,6c,00,67,00,6e,00,74,00,66,00,79,00,2e,00,64,00,/[/align]
[align=left] 6c,00,6c,00,00,00[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/SensLogn][/align]
[align=left]"DLLName"="WlNotify.dll"[/align]
[align=left]"Lock"="SensLockEvent"[/align]
[align=left]"Logon"="SensLogonEvent"[/align]
[align=left]"Logoff"="SensLogoffEvent"[/align]
[align=left]"Safe"=dword:00000001[/align]
[align=left]"MaxWait"=dword:00000258[/align]
[align=left]"StartScreenSaver"="SensStartScreenSaverEvent"[/align]
[align=left]"StopScreenSaver"="SensStopScreenSaverEvent"[/align]
[align=left]"Startup"="SensStartupEvent"[/align]
[align=left]"Shutdown"="SensShutdownEvent"[/align]
[align=left]"StartShell"="SensStartShellEvent"[/align]
[align=left]"PostShell"="SensPostShellEvent"[/align]
[align=left]"Disconnect"="SensDisconnectEvent"[/align]
[align=left]"Reconnect"="SensReconnectEvent"[/align]
[align=left]"Unlock"="SensUnlockEvent"[/align]
[align=left]"Impersonate"=dword:00000001[/align]
[align=left]"Asynchronous"=dword:00000001[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/termsrv][/align]
[align=left]"Asynchronous"=dword:00000000[/align]
[align=left]"DllName"=hex(2):77,00,6c,00,6e,00,6f,00,74,00,69,00,66,00,79,00,2e,00,64,00,/[/align]
[align=left] 6c,00,6c,00,00,00[/align]
[align=left]"Impersonate"=dword:00000000[/align]
[align=left]"Logoff"="TSEventLogoff"[/align]
[align=left]"Logon"="TSEventLogon"[/align]
[align=left]"PostShell"="TSEventPostShell"[/align]
[align=left]"Shutdown"="TSEventShutdown"[/align]
[align=left]"StartShell"="TSEventStartShell"[/align]
[align=left]"Startup"="TSEventStartup"[/align]
[align=left]"MaxWait"=dword:00000258[/align]
[align=left]"Reconnect"="TSEventReconnect"[/align]
[align=left]"Disconnect"="TSEventDisconnect"[/align]
[align=left] [/align]
[align=left][HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Winlogon/Notify/wlballoon][/align]
[align=left]"DLLName"="wlnotify.dll"[/align]
[align=left]"Logon"="RegisterTicketExpiredNotificationEvent"[/align]
[align=left]"Logoff"="UnregisterTicketExpiredNotificationEvent"[/align]
[align=left]"Impersonate"=dword:00000001[/align]
[align=left]"Asynchronous"=dword:00000001[/align]
 
 
[align=left]PRB: System Error Message "&H80004015" When You Run ActiveX DLL in Visual Basic IDE[/align]
[align=left]View products that this article applies to.[/align]

Article ID
[align=left]:[/align]
[align=left]228487[/align]
[align=left]Last Review[/align]
[align=left]:[/align]
[align=left]May 13, 2003[/align]
[align=left]Revision[/align]
[align=left]:[/align]
[align=left]2.0[/align]
[align=left]This article was previously published under Q228487[/align]
[align=left]SYMPTOMS[/align]
When you try to run an ActiveX DLL from the Visual Basic IDE, you receive the following error message:
[align=left]System error &H80004015(-2147467243). The class is configured to run as a security ID different from the caller. [/align]




[align=left]Back to the top[/align]
[align=left]CAUSE[/align]
When Visual Basic runs an ActiveX DLL from the IDE, it calls the CoRegisterClassObject application programming interface (API) to temporarily register the server. This creates the AppId and specifies it to run in the Interactive User context.

This problem occurs because of 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 that is listed in the "Symptoms" section of this article under the following conditions:

[align=left]•[/align]
[align=left]If the ActiveX server that calls the API is set to run by using the Interactive User identity. -and-[/align]
[align=left]•[/align]
[align=left]The string that is associated with the following registry key contains any value other than a single valid executable name for the shell process:[/align]
[align=left]HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion/Winlogon Shell=[/align]
[align=left]Under Microsoft Windows 2000, this error occurs when the Certification Authority service does not start. [/align]




[align=left]Back to the top[/align]
[align=left]RESOLUTION[/align]
Make sure 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 about how to handle this error when it is related to the Certification Authority on systems that are running Windows 2000.




[align=left]Back to the top[/align]
[align=left]REFERENCES[/align]
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
[align=left]170364 (http://support.microsoft.com/kb/170364/EN-US/) CoRegisterClassObject Fails with CO_E_WRONG_SERVER_IDENTITY [/align]
 
 
 
 
[align=left]FIX: CoRegisterClassObject Fails with CO_E_WRONG_SERVER_IDENTITY[/align]
[align=left]View products that this article applies to.[/align]

Article ID
[align=left]:[/align]
[align=left]170364[/align]
[align=left]Last Review[/align]
[align=left]:[/align]
[align=left]July 11, 2005[/align]
[align=left]Revision[/align]
[align=left]:[/align]
[align=left]2.1[/align]
[align=left]This article was previously published under Q170364[/align]
[align=left]SYMPTOMS[/align]
The CoRegisterClassObject() API fails with the error "CO_E_WRONG_SERVER_IDENTITY" under the following conditions:

[align=left]1.[/align]
[align=left]If the COM server calling the API is set to run under the "Interactive User" identity. -and-[/align]
[align=left]2.[/align]
[align=left]The string for the following named value contains any value other than a single valid executable name for the shell process. [/align]
[align=left]   HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion/Winlogon[/align]
[align=left]   Shell=[/align]
[align=left]                                              [/align]
[align=left] [/align]




[align=left]Back to the top[/align]
[align=left]RESOLUTION[/align]
This bug can be avoided by making sure that the shell-named value has only one string representing the valid process .exe name associated with it. The shell-named value contains the string "Explorer.exe" by default. The problem occurs if the shell-named value has been modified and is not a string representing the valid .exe name for a single-shell process. In particular, multiple .exe names (such as "Explorer.exe cmd.exe"), command line switches for a single valid .exe (such as "Explorer.exe /s"), or no valid .exe name (a bogus shell name or a NULL string) will result in this error.




[align=left]Back to the top[/align]
[align=left]STATUS[/align]
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 Windows NT 4.0 Service Pack 4.




[align=left]Back to the top[/align]
[align=left]MORE INFORMATION[/align]
The implementation of CoRegisterClassObject() checks to see if the the security identity of the process (COM server) that is calling it matches the security identity that the class is registered to run under.When the server is set to run under the "Interactive User" identity, CoRegisterClassObject() must determine dynamically the identity of the current interactive user in order to make the comparison. To do that, the implementation of the API will compare the security identity of the calling process with the security identity of the running process named in the shell-named value to ensure that they match. At the present time, COM assumes that the shell value is a single valid .exe name that has been launched by Winlogon as the interactive user's primary process. When the string for this value contains multiple substrings or no string exists for this value, COM is unable to find a process running as the interactive user and the security comparison will always fail. As a result, the API will incorrectly return the error. (See the References section for a KB article that describes the circumstances under which CoRegisterClassObject() correctly returns the CO_E_WRONG_SERVER_IDENTITY error code.)

One of the reasons why this named value contains substrings is that you need to start the shell process with a command line parameter. For example "Explorer.exe cmd.exe" starts Explorer.exe as the shell and passes cmd.exe as a command line parameter to Explorer.exe, which in turn causes Explorer to spawn cmd.exe. You can work around this requirement by adding cmd.exe to the HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run key in the registry which is more appropriate for this purpose.




[align=left]Back to the top[/align]
[align=left]REFERENCES[/align]
For additional information, please see the following article(s) in the Microsoft Knowledge Base:
[align=left]169321 (http://support.microsoft.com/kb/169321/EN-US/) INFO: COM Servers Activation and NT Windows Stations [/align]
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐