views:

294

answers:

1

Hi,

I have a 32 bit Com Component DLL and this DLL is written by Delphi. Its a WIN32 DLL. I want to use this DLL in my Visual C# project on .NET platform.

I cant add referance this DLL to project. I try to register in Command Prompt as Administrator in Windows 7 OS but ı get this error.

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

what can I do?

+4  A: 

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.

sharptooth
+1, indeed. And that DLL should *not* be stored in c:\windows\system32 either, that's for 64-bit components.
Hans Passant