32位DLL“可能不兼容”。在Server 2008上运行,但在Server 2003上运行 [英] 32-bit DLL "may not compatible" on Server 2008, but works on Server 2003

查看:220
本文介绍了32位DLL“可能不兼容”。在Server 2008上运行,但在Server 2003上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个项目可以编译为32位COM DLL和64位COM DLL(我之前的问题)。当我在Windows 7计算机上都注册时,两个都成功注册。当我同时在Windows Server 2003计算机上注册时,两个都成功注册。

We have a project that compiles to a 32-bit COM DLL and to a 64-bit COM DLL (the same one from my earlier question). When I register both on my Windows 7 machine, both register successfully. When I register both on a Windows Server 2003 machine, both register successfully.

但是但是,当我尝试在Windows Server 2008上注册DLL时。在R2标准SP1机器上,成功注册了64位DLL,但是 32位 DLL失败,并显示以下消息(sic):

But when I try to register the DLLs on a Windows Server 2008 R2 standard SP1 machine, the 64-bit DLL registers successfully, but the 32-bit DLL fails with the message (sic):

模块%1可能与您正在运行的Windows版本不兼容。
检查模块是否与regsvr32.exe的x86(32位)或x64(64位)版本兼容。

我认为32位DLL不能与WS2003和Win7兼容,但不能与WS2008兼容。

I don't think a 32-bit DLL can be compatible with WS2003 and Win7 but not WS2008. That makes no sense.

可能会发生什么?

推荐答案

Regsvr32.exe的版本必须与您尝试注册的dll的32位/ 64位匹配。 64位regsvr32无法加载32位dll,反之亦然。

The version of Regsvr32.exe must match the 32-/64-bitness of the dll you're trying to register. The 64-bit regsvr32 cannot load a 32-bit dll, and vice versa.

您可能需要显式调用位于%systemroot%\中的regsrv32的32位版本。 \SysWoW64\regsvr32.exe。

You may need explicitly call the 32-bit version of regsrv32 located in %systemroot%\SysWoW64\regsvr32.exe.

来自 http://support.microsoft.com/kb/249873

Regsvr32.exe包含在Microsoft Internet Explorer 3.0或更高版本,Windows 95 OEM Service Release 2(OSR2)或更高版本以及Windows NT 4.0 Service中Pack 5(SP5)或更高版本。 Regsvr32.exe安装在系统(Windows Me / Windows 98 / Windows 95)或System32(Windows NT / Windows XP / Windows Vista / Windows 7)文件夹中。

Regsvr32.exe is included with Microsoft Internet Explorer 3.0 or later versions, Windows 95 OEM Service Release 2 (OSR2) or later versions, and Windows NT 4.0 Service Pack 5 (SP5) or later versions. Regsvr32.exe is installed in the System (Windows Me/Windows 98/Windows 95) or System32 (Windows NT/Windows XP/Windows Vista/Windows 7) folder.

注意在64位版本的Windows操作系统上,有两个版本的Regsv32.exe文件:

Note On a 64-bit version of a Windows operating system, there are two versions of the Regsv32.exe file:


  • 64位版本是%systemroot%\System32\regsvr32.exe。

  • 32位版本是%systemroot%\SysWoW64\regsvr32.exe。

Regsvr32.exe的用法
RegSvr32.exe具有以下命令行选项:
Regsvr32 [/ u ] [/ n] [/ i [:cmdline]] dllname

Regsvr32.exe usage RegSvr32.exe has the following command-line options: Regsvr32 [/u] [/n] [/i[:cmdline]] dllname

/ u-注销服务器
/ i-调用DllInstall,并为其传递可选的[cmdline] ;与/ u一起使用时,调用dll卸载
/ n-不要调用DllRegisterServer;此选项必须与/ i
/ s一起使用-静默;不显示任何消息框(Windows XP和Windows Vista中已添加)
使用Regsvr32.exe时,它将尝试加载该组件并调用其DLLSelfRegister函数。如果此尝试成功,Regsvr32.exe将显示一个对话框,指示成功。如果尝试失败,则Regsvr32.exe返回错误消息。这可能包括Win32错误代码。有关更多信息,请单击下面的文章编号,以查看Microsoft知识库中相应的文章:
193625 WinInet错误代码(12001至12156)

/u - Unregister server /i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall /n - do not call DllRegisterServer; this option must be used with /i /s – Silent; display no message boxes (added with Windows XP and Windows Vista) When you use Regsvr32.exe, it attempts to load the component and call its DLLSelfRegister function. If this attempt is successful, Regsvr32.exe displays a dialog box that indicates success. If the attempt is unsuccessful, Regsvr32.exe returns an error message. This may include a Win32 error code. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 193625 WinInet error codes (12001 through 12156)

这篇关于32位DLL“可能不兼容”。在Server 2008上运行,但在Server 2003上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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