Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2003-12-08
3
Medium Priority
?
2,035 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 750 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

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.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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…
Introduction to Processes

705 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