Solved

Registering ATL/COM DLL object - fails with return code 0x80020009

Posted on 2003-12-08
3
2,031 Views
Last Modified: 2013-11-25

I have an ATL COM object, which also uses MFC.  I am building in VC++ 6, but when I register my object with regsvr32.exe, it fails with a return code of 0x80020009.  However, if I remove all OBJECT_ENTRY() items from the object map, all works fine.  This simply confirms something is corrupt or missing in when the object is registered.

I have verified that all dependencies are found and linked correctly.

A breakpoint is set in DllRegisterServer, which simply calls:

    return _Module.RegisterServer(TRUE);

However, I am unsure what I am trying to find to resolve this.

I am including the .rgs files in the resource for each class, and have the DECLARE_REGISTRY_RESOURCEID() macro in place in the header file.

Any pointers appreciated to help track this down.  I am skilled in MFC more than ATL, though I have written several ATL and COM objects over the years.
0
Comment
Question by:dmetzler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
vascov earned 250 total points
ID: 9903526
Does this happen for any build ( Debug, ReleaseMinDependency, ReleaseMinSize ) ?

Here are some things to investigate:
* if this is happening only in MinDependency, add atl.dll
* Try to register your from a simple path (no spaces)  (i vaguely recall a bug in regsvr32.exe that had to do with path names)
* It's a long shot, but it might also be related with security Q190686 (http://support.microsoft.com/?kbid=190686)
* Also make sure you don't have initialization code running making use of COM before COM is initialized (global vars that make use of other objects for instance)


0
 

Author Comment

by:dmetzler
ID: 9916207
I found it - there were lines in the .RGS file that were causing this.  While I have not tracked down the specific problem, I have fixed it.  However, since you answered with good suggestions, you will get the points.

Thanks!

Don
0
 
LVL 12

Expert Comment

by:vascov
ID: 9916486
Thanks.

Glad that you nailed it!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A short article about a problem I had getting the GPS LocationListener working.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question