Registering a 32 bit DLL with 64 bit regsvr32 Registering a 32 bit DLL with 64 bit regsvr32 windows windows

Registering a 32 bit DLL with 64 bit regsvr32


This should explain how it happens exactly:


(source: alax.info)

regsvr32 will start it's another bitness twin internally to match the bitness of the DLL. This is how registration succeeds. You don't need to care whether you start 32-bit or 64-bit version of regsvr32 because it will take care of mismatch.

The scenario when you need to care is when you start regsvr32 from Visual Studio as debugging host. You want correct bitness there, because child process with actual registration will run outside of debugger and you won't be able to step your code through.


It seems Mats and my assumption were correct. MS have re-engineered the 64 bit regsvr32 so that based on the target dll bitness it may spawn up a new 32 bit regsvr32 process from %SYSWOW64% to register the DLL. To prove this point, I fired up procexp, spied on the pop up Window for the 32 bit DLL and here was what showed up.

Couple of things to note

  1. The Command line for the 32 bit regsvr32 maps with the 32 bit DLL name I was trying to register
  2. The 32 bit Version of the regsvr32 is a child process of the 64 bit version of regsvr32
  3. The Image Type and the Path Column

enter image description here