Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug regsvr32 post-compile DLL registration exception?

I'm using Visual Studio 2008 (on Windows 2003 Server / 32 bit) to compile a library and after the DLL is produced the "Custom Build Step" -> "General" executes a command line:

regsvr32 /s /c "($TargetPath)"

which generates the exception:

An unhandled win32 exception occurred in regsvr32.exe [212].

This throws up a debug session, which shows remarkably little information.

Running the regsvr32 from the command line in a cmd window throws an exception (though the number at the end is different).

Any pointers appreciated!

like image 999
Peter K. Avatar asked Apr 29 '09 12:04

Peter K.


1 Answers

run the dll in the debugger, set regsvr32 as the debug target.

You'll want to place a breakpoint in the DllRegisterServer function.

like image 168
gbjbaanb Avatar answered Nov 12 '22 17:11

gbjbaanb