Register 32 bit COM DLL to 64 bit Windows 7

后端 未结 10 1353
小蘑菇
小蘑菇 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 05:40

    http://onerkaya.blogspot.com/2013/03/register-com-dll-on-windows-64-bit.html

    Retrieving the COM class factory for component with CLSID {...} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

    if you try this;

    c:\windows\system32\regsvr32.exe < filename >.dll

    you can still take this exception. so IIS- pool Advanced settings, Enable 32 bit application : true ;)

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

    Below link saved the day

    https://msdn.microsoft.com/en-us/library/ms229076(VS.80).aspx

    use the relevant RegSvcs as specified in the above link

    c:\Windows\Microsoft. NET\Framework\v4.0.30319\RegSvcs.exe ....\Shared\Your.dll /tlb:Your.tlb

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

    I was getting the error "The module may compatible with this version of windows" for both version of RegSvr32 (32 bit and 64 bit). I was trying to register a DLL that was built for XP (32 bit) in Server 2008 R2 (x64) and none of the Regsr32 resolutions worked for me. However, registering the assembly in the appropriate .Net worked perfect for me. C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe

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

    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.

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

    Try to run it at Framework64.

    Example:

    • 32 bit

      C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe D:\DemoIconOverlaySln\Demo\bin\Debug\HandleOverlayWarning\AsmOverlayIconWarning.dll /codebase 
      
    • 64 bit

      C:\Windows\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe D:\DemoIconOverlaySln\Demo\bin\Debug\HandleOverlayWarning\AsmOverlayIconWarning.dll /codebase
      
    0 讨论(0)
  • 2020-11-27 05:58

    For 32 bit DLLS in Windows 64 bit platforms:

    1. Copy whatever.dll to c:\windows\sysWOW64\
    2. Open a CMD prompt AS ADMINISTRATOR (very important)

    In the CMD window:

    1. CD c:\windows\sysWOW64\
    2. regsvr32 whatever.dll

    You will then be executing the 32-bit regsvr (c:\windows\sysWOW64\regsvr.exe) on a 32 bit dll

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