BUG: "Access Denied" Error Message in Response to DCOM Activation for ATL-Built COM Servers (305746)
The information in this article applies to:
- Microsoft Windows NT Server 4.0 Terminal Server Edition
- Microsoft Windows 2000 Professional
- Microsoft COM
- Microsoft Windows NT Workstation 4.0
- Microsoft Windows Millennium Edition
- Microsoft Windows 98
- Microsoft Windows 95
This article was previously published under Q305746 SYMPTOMS
DCOM activation for Active Template Library (ATL)-built COM servers may fail with the following error message:
0x80070005 (E_ACCESSDENIED)
CAUSE
This behavior can occur if there is a short-file-name versus long-file-name conflict in the registry.
COM servers are registered under the HKEY_CLASSES_ROOT\AppID key in a named value that indicates the module name (such as OUROLEAPP.EXE). This type of named value is REG_SZ, and it contains the string representation of the AppID associated with the executable. This mapping is used to obtain the default access permissions and authentication level. An ATL server with a long file name is registered under the CLSID\LocalServer32 key with a short file name (OUROLE~1.EXE). However, when the Dcomcnfg utility creates the mapped executable name for the server in the registry that points to the actual AppID key of the server, it uses the long file name (OUROLEAPP.EXE).
RESOLUTION
To work around this issue, use either of the following methods:
- Add an additional key, HKEY_CLASSES_ROOT\AppID\OUROLE~1.EXE, that maps to the same AppID as HKEY_CLASSES_ROOT\AppID\OUROLEAPP.EXE.
This is the preferred method.
-or- - Rename the HKEY_CLASSES_ROOT\AppID\OUROLEAPP.EXE as HKEY_CLASSES_ROOT\AppID\OUROLE~1.EXE.
NOTE: Use project names that are eight characters or less when you create ATL-built COM servers.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
201318 Registering ATL Server with Long Name Causes 0x80070002
Modification Type: | Minor | Last Reviewed: | 12/21/2004 |
---|
Keywords: | kbbug kbDCOM kberrmsg kbnofix KB305746 |
---|
|