wrap 32 bit dll for 64 bit operating system to work with regsvr32.exe(为 64 位操作系统包装 32 位 dll 以使用 regsvr32.exe)
问题描述
我们目前正在将我们的网站从 Windows 2003(32 位)转移到 Windows 2008(64 位)并且遇到了问题.
We are currently transferring our websites from Windows 2003 (32-bit) to Windows 2008 (64-bit) and have hit a problem.
我们的一个网站使用支付网关 HSBC CPI,它需要注册一个 DLL (regsvr32.exe),然后这个 DLL 在一个经典的 asp 网站中使用.问题是 DLL 是 32 位 DLL,因此它不会在 Windows 2008 操作系统中注册.
One of our website use the payment gateway HSBC CPI which requires a DLL to be registered(regsvr32.exe), this DLL is then used inside a classic asp website. The problem is the DLL is a 32-bit DLL and so it will not register with the the Windows 2008 operating system.
有没有办法可以将这个 32 位 dll 包装在 c#.net 项目中,以便公开它的方法并可以在操作系统中注册?
Is there a way we can wrap this 32 bit dll in a c#.net project so that it's methods are exposed and can be registerd with the OS?
非常感谢任何帮助.
推荐答案
您可以使用 C:WindowsSysWOW64 文件夹中的 regsvr32.exe 注册 DLL.
You can register the DLL with regsvr32.exe from the C:WindowsSysWOW64 folder.
但是,由于您不能混合 64/32 位代码,因此您必须创建一个在 x86 中运行的 C# 服务(请参阅项目属性、平台目标),然后您可以通过 WCF 从您的 x64 Web 应用程序中使用该服务.
However since you can't mix 64/32bit code you'd have to create a C# service running in x86 (see the project properties, platform target) that you can then use from your x64 web app via WCF.
更简单的选择是向 HSBC 索要 x64 dll.
An easier option would be to ask HSBC for a x64 dll.
这篇关于为 64 位操作系统包装 32 位 dll 以使用 regsvr32.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为 64 位操作系统包装 32 位 dll 以使用 regsvr32.exe


基础教程推荐
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01