How to debug regsvr32 registry after compiling dll?

I use Visual Studio 2008 (on Windows 2003 Server / 32 bit) to compile the library and after creating the DLL "Custom Build Step" β†’ "General" it executes the command line:

regsvr32 / s / c "($ TargetPath)"

which throws an exception:

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

This causes a debugging session that shows very little information.

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

Any pointers appreciated!

+4
source share
2 answers

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

You will want to place a breakpoint in the DllRegisterServer function.

+10
source

Your code should implement DllRegisterServer, add a MessageBox there, and when you run regsvr32, you should delete it, attach to this process at this time

-1
source

All Articles