4

I am getting an error 0x80070716 when regsvr32 is done with the ATL Dll x64, under Win7 x64.

I made a search before putting the question, and verfying with some threads in other web sites like this one http://www.tek-tips.com/viewthread.cfm?qid=1085835 and an other one here it is http://forums.codeguru.com/printthread.php?t=366207. But those threads have not solve my problem.

Please let me know if anyone could help me.

1
  • 1
    For the body that's downvoting my question, give an explanation at least for other members, if not for me, that's not encouraging for collaboration in this site
    – FreeDev
    Oct 29, 2014 at 9:34

2 Answers 2

9

Another possible reason for such error is missing entries for .rgs files in your resource file, i.e. <my_library>.rc

Each .rgs file must be referenced in REGISTRY section of <my_library>.rc like this:

IDR_MYRESOURCE REGISTRY "myresource.rgs"

To open your .rc file in text mode, use "View Code" command in its context menu in Solution Explorer.

7

I will share my solution, maybe it will help some one in the future:

1) Select the "ResourceView" tab in the Workspace Menu Bar.

2) Right click on the resource folder for the component that is failing to register.

3) Select the "Resource Symboles..." menu option.

4) Remove all unused symboles and close.

When I build the project I get error error C2065: IDR_<MYWrongIDRegistryClass> : undeclared identifier; in DECLARE_REGISTRY_RESOURCEID so :

5) Replace IDR_<MYWrongClass> with the IDR_<MYCorrectIDRegistryClass>.

These steps make my ATL COM DLL registred successfully after I made build.

Hope this will help anyone that faces the same problem.

1
  • Interesting that I didn't have this error before adding another COM class into the library. But in the end the reason of the issue was the unused IDR but for another class. Anyway, this solution helped me and could help those who started getting 0x80070716 error after introducing a new COM class in the library. Oct 21, 2021 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.