DebugSetting1

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.

  1. Right click you DLL project –> Open “Properties”.
  2. Go to “Configuration Properties” –> “Debugging” .
  3. In “Command”, fill it “C:WINDOWSsystem32regsvr32.exe”
  4. In “Command Arguments”, fill it “$(TargetPath)”
  5. Just press F5 to run it.

Please note, you should setting break point as follows:

  • DllMain
  • DllRegisterServer
  • DllUnregisterServer (if unregister failed).

That’s it~~~


Buy Me A Coffee

Evan

Attitude is everything