问题描述
我们目前正在将我们的网站从 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)