I know many people feel confuse if your COM DLL failed during registeration (using RegSvr32 to register it). I spent a little time, and find out how to debug it. It can help you to find out what is the root cause. OK! let get start.
How can we do if register COM dll failed? > >
Firstable, you can use “dumpbin /dependents YOURDLL.DLL” to find out if you lost some dependency DLL.
Ok! ~~ let go to debug DLL registeration.
- Right click you DLL project –> Open “Properties”.
- Go to “Configuration Properties” –> “Debugging” .
- In “Command”, fill it “C:WINDOWSsystem32regsvr32.exe”
- In “Command Arguments”, fill it “$(TargetPath)”
- Just press F5 to run it.
Please note, you should setting break point as follows:
- DllUnregisterServer (if unregister failed).