将 32 位 COM DLL 注册到 64 位 Windows 7 [英] Register 32 bit COM DLL to 64 bit Windows 7

查看:36
本文介绍了将 32 位 COM DLL 注册到 64 位 Windows 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 32 位 COM 组件 DLL,这个 DLL 是用 Delphi 编写的.它是一个 Win32 DLL.我想在我的 .NET 平台上的 Visual C# 项目中使用这个 DLL.

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.

我无法在项目中添加对这个 DLL 的引用.我尝试在 Windows 7 64 位中以管理员身份在命令提示符中注册它,但出现此错误:

I can't add reference to this DLL in the project. I try to register it in Command Prompt as Administrator in Windows 7 64 bit, but I get this error:

检查模块是否与 regsvr32.exe 的 x86(32 位)或 x64(64 位)版本兼容.

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

首先我将 DLL 文件放到 windows/system32 文件夹中.然后我以管理员身份打开命令提示符.我编写 regsvr32 huginalpha.dll 并执行此命令.但我得到了错误.我该怎么办?

First I put DLL file to windows/system32 folder. Then I open Command Prompt as Administrator. I write regsvr32 huginalpha.dll and execute this command. But I get the error. what can I do?

推荐答案

问题很可能是您尝试使用 64 位版本的 regsvr32 注册 32 位库.请参阅此知识库文章 - 对于 32 位库,您需要从 windowsSysWOW64 运行 regsvr32.

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 windowsSysWOW64 for 32-bit libraries.

这篇关于将 32 位 COM DLL 注册到 64 位 Windows 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆