BUG: CoRegisterClassObject Fails with CO_E_WRONG_SERVER_IDENTITYLast reviewed: July 3, 1997Article ID: Q170364 |
The information in this article applies to:
SYMPTOMSThe CoRegisterClassObject() API fails with the error "CO_E_WRONG_SERVER_IDENTITY" under the following conditions:
RESOLUTIONThis 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.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe 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.
REFERENCESFor additional information, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q169321 TITLE : INFO: COM Servers Activation and NT Windows Stations |
Keywords : BseRegistry BseSecurity
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |