本文介绍了我的32位和64位COM组件是否可以共同驻留在同一台机器上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个32位COM组件,主要由ASP使用,我们也有64位版本。



64位版本在功能上是一样的,它也是使用相同的ProgID(据我所知,相同的CLSID等)。



我可以在64位版本的同一台机器上安装/ regsvr 64位版本(显然在不同的文件夹中),并且现有的32位应用程序继续使用32位组件,而64位应用程序使用64位版本?



使用C ++编写的本地代码组件,而不是.NET。

解决方案

应该可以。



在64位窗口中,和被重定向到32位应用程序。 32位COM DLL的注册将位于注册表(HKLM\Software\Wow6432Node\Classes)中的单独位置,您的COM组件应该位于单独的文件夹中,64位在程序文件和32位在程序文件(x86)下。 32位应用程序的注册表/文件重定向应该使其透明地工作。



组件本身可能会阻止这种情况 - 例如,如果创建全局资源这将缓解32位和64位版本之间的冲突。



这种情况已经存在于64位Windows上。在我的64位系统上,我有:



HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID {8856F961-340A-11D0-A96B-00C04FD705A2} \ InProcServer32\Default = C:\Windows\SysWow64\ieframe.dll





HKEY_CLASSES_ROOT \CLSID {8856F961-340A-11D0-A96B-00C04FD705A2} \InProcServer32\Default = C:\Windows\System32\ieframe.dll



32位和64位版本的WebBrowser控件在同一系统上。


I have a 32 bit COM component that is used mostly by ASP, we also have the 64 bit version.

The 64 bit version is functionally identical and it also uses the same ProgID (and as far as I know the same CLSID's etc).

Can I install/regsvr the 64 bit version on the same machine as the 32 bit version (obviously in a different folder) and have my existing 32 bit applications continue to use the 32 bit component, whilst my 64 bit applications consume the 64 bit version?

These are native code components written in C++ and not .NET.

解决方案

This should be possible.

On 64-bit windows, the registry and file system is redirected for 32-bit applications. Registration for the 32-bit COM dll's will be under a separate location in the registry (HKLM\Software\Wow6432Node\Classes), and your COM components should live in separate folders, 64-bit under Program Files and 32-bit under Program Files (x86). The registry/file redirection for 32-bit apps should make this work transparently.

It is possible that the component itself could prevent this - for instance, if it creates global resources that would wind up conflicting between the 32-bit and 64-bit versions.

This situation already exists on 64-bit Windows. On my 64-bit system I have:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID{8856F961-340A-11D0-A96B-00C04FD705A2}\InProcServer32\Default = C:\Windows\SysWow64\ieframe.dll

And

HKEY_CLASSES_ROOT\CLSID{8856F961-340A-11D0-A96B-00C04FD705A2}\InProcServer32\Default = C:\Windows\System32\ieframe.dll

32-bit and 64-bit version of WebBrowser control on the same system.

这篇关于我的32位和64位COM组件是否可以共同驻留在同一台机器上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 19:25