Microsoft Knowledge Base Email Alertz

(305746) - DCOM activation for Active Template Library (ATL)-built COM servers may fail with the following error message: 0x80070005 ( E_ACCESSDENIED )

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 305746 - Last Review: February 12, 2007 - Revision: 4.3

BUG: "Access Denied" Error Message in Response to DCOM Activation for ATL-Built COM Servers

System TipThis article applies to a different version of Windows than the one you are using. Content in this article may not be relevant to you. Visit the Windows Vista Solution Center
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.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

REFERENCES

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
201318  (http://kbalertz.com/Feedback.aspx?kbNumber=201318/EN-US/ ) Registering ATL Server with Long Name Causes 0x80070002

APPLIES TO
  • Microsoft Windows NT Server 4.0, Terminal Server Edition
  • Microsoft Windows 2000 Professional Edition
  • Microsoft COM+ 2.0 Standard Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows Millennium Edition
  • Microsoft Windows 98 Standard Edition
  • Microsoft Windows 95
Keywords: 
kbbug kbdcom kberrmsg kbnofix KB305746
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate