Considering the following Understanding
regsvr32
calls the entry point DllRegisterServer
/ DllUnregisterServer
after loading the target DLL into its address space through LoadLIbrary
.C:\Windows\SysWOW64
But then on my 2008 R2 Box, I was able to register a 32 bit dll by the 64 bit regsvr32. How was that possible? Am I missing something?
The example I wanted to highlight in the screenshot was the last for which the Dialog pops up.
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.