Register 32 bit COM DLL to 64 bit Windows 7

Murat picture Murat · Aug 9, 2010 · Viewed 226k times · Source

I have a 32 bit COM component DLL and this DLL is written in Delphi. It's a Win32 DLL. I want to use this DLL in my Visual C# project on .NET platform.

I can't add reference to this DLL in the project. I try to register it in Command Prompt as Administrator in Windows 7 64 bit, but I get this error:

Check if the module is compatible with an x86 (32-bit) or x64 (64-bit) version of regsvr32.exe.

First I put DLL file to windows/system32 folder. Then I open Command Prompt as Administrator. I write regsvr32 huginalpha.dll and execute this command. But I get the error. what can I do?

Answer

sharptooth picture sharptooth · Aug 9, 2010

The problem is likely you try to register a 32-bit library with 64-bit version of regsvr32. See this KB article - you need to run regsvr32 from windows\SysWOW64 for 32-bit libraries.