Question

I'm trying to register an x64 COM server dll for use in x64 office on x64 windows 7. I have followed the instructions here but I cannot register the dll. When I attempt to I get the following error:

regsvr error message

The command I use is regsvr32 my_x64_com_server.dll

Why is this happening and is there a workaround?

Thanks in advance.

Was it helpful?

Solution

How is the command being run? From a process or from a command line?

Make sure the command is being run from a 64-bit process (or a 64-bit cmd.exe console window). Otherwise, the %windir%\System32\regsvr32.exe command will be redirected to %windir%\SysWoW64\regsvr32.exe and a 32-bit regsrv32 will be run (which can't register 64-bit DLLs).

You could also try using %windir%\sysnative\regsvr32.exe which will redirect to the real %windir%\System32\ directory (but only from a 32-bit process, so if you use that take care to make sure no one tries to run the command from a 64-bit process).

See File System Redirector on MSDN for details.

OTHER TIPS

I faced a similar issue when I was upgrading windows 2003 to window 2012 server. Below solution helped me to resolve it. I had to register the dll as 32 bit.

**

- Solution:

**Open Command prompt as Administrator

**Type the directory where you want to execute the dll execute regsvr32

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top