What is it?

Regsvr64 is a developer tool that can be used to register COM DLLs on 32-bit and 64-bit systems. It is implemented as a pair of executables, one 32-bit and one 64-bit. They can both register COM DLLs just like regsvr32 can.

The pair of Regsvr64 executables

How do I use it?

To use Regsvr64 to register a COM DLL, always use the 32-bit executable, named Regsvr64.exe (a bit weird, yeah). The tool will scan the DLL passed in and will detect its bitness. If the DLL targets the x64 platform, the tool will automatically launch the other executable to perform the registration.

The tool has a list of command-line arguments that is similar to regsvr32. Running the executable without arguments will display the command-line options.

Regsvr64's command-line options

So what's the point?

The point of using Regsvr64 is that it can be used to safely register 64-bit DLLs on all systems. If a 64-bit DLL is passed in and the tool runs on a 32-bit system, nothing happens and the tool acts like everything has been registered smoothly.

Skipping registration of a 64-bit DLL on a 32-bit system

Anything else?

For developers wishing to use the Regsvr64 tool from within their source code project, here is an example on how to setup registration of a 64-bit DLL in a Visual Studio post-build step using Regsvr64. Note that the example uses the /s command-line option to obtain a silent registration, without any dialog boxes.

Using Regsvr64 in a Visual Studio post-build step

Of course, Regsvr64 could also be used with any development tool. Setup depends on the development environment that is used.

Last edited Jan 1, 2015 at 1:34 PM by clechasseur, version 6