Register 32 bit COM DLL to 64 bit Windows 7

后端 未结 10 1354
小蘑菇
小蘑菇 2020-11-27 05:27

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

相关标签:
10条回答
  • 2020-11-27 06:00

    put the dll in system32 or syswow32 directory, and use appropriate regsvr32 to register it. wiered that even though it gave failed to register error, I rebooted my WIN 7 64 AND my vb app loaded the dll just fine!!

    0 讨论(0)
  • 2020-11-27 06:05

    If problem not resolved, when using SysWoW64 version of regsvr32, make sure all library dependencies have same archetecture. For example, when

    regsvr32 lib_x86.dll fails to register library, and %SystemRoot%\SysWow64\regsvr32 lib_x86 also fails, try to load lib_x86 to Dependency Walker application to see whole list of dependencies. If any item have 64-bit archetecture, here is the reason, why regsvr32 fails to load 32-bit library.

    0 讨论(0)
  • 2020-11-27 06:06

    To register a comm .dll or .ocx on Windows 7 32-bit, do the following:

    Copy .dll or .ocx to c:\windows\system32 Type cmd in Run menu, it will search cmd.exe, right click and click Run as Administrator

    It will show a prompt at c:\windows\system32

    Type

    regsvr32 ocxname.ocx to register .ocx

    or

    type regsvr32 dllname.dll to register .dll

    0 讨论(0)
  • 2020-11-27 06:07

    I believe, things have changed now. On My Win 2008 R2 Box, I was able to register a 32 bit dll with a 64 bit regsvr32 as the 64 bit version can detect the target bitness and spawn a new 32 bit regsvr32 from %SYSWOW% folder.

    Refer: Registering a 32 bit DLL with 64 bit regsvr32

    0 讨论(0)
提交回复
热议问题