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.

 

转载:http://stackoverflow.com/questions/26613734/atl-com-dll-register-error-0x80070716