Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

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.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Simple Linear Regression
Suggested Courses

926 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