问题描述
我有一个主要由ASP使用的32位COM组件,我们也有64位版本。
I have a 32 bit COM component that is used mostly by ASP, we also have the 64 bit version.
64位版本功能相同,使用相同的ProgID(和我知道相同的CLSID的etc)。
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).
我可以在32位版本的同一台机器上安装/ regsvr 64位版本(显然在不同的文件夹中),并且我现有的32位应用程序继续使用32位组件,而我的64位应用程序使用64位版本?
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?
推荐答案
这应该是可能的。
在64位Windows上,和是重定向为32位应用程序。 32位COM dll的注册将在注册表中的一个单独的位置(HKLM \Software \Wow6432Node\Classes),您的COM组件应该居住在单独的文件夹,64位在程序文件和32位在程序文件(x86)下。 32位应用程序的注册表/文件重定向应该使此工作透明化。
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.
组件本身可能阻止这种情况 - 例如,如果它创建全局资源这将导致32位和64位版本之间的冲突。
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.
这种情况在64位Windows上已存在。在我的64位系统上,我有:
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
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
HKEY_CLASSES_ROOT\CLSID{8856F961-340A-11D0-A96B-00C04FD705A2}\InProcServer32\Default = C:\Windows\System32\ieframe.dll
32位和64位版本的WebBrowser控件在同一个系统上。
32-bit and 64-bit version of WebBrowser control on the same system.
这篇关于我的32位和64位COM组件可以共存在同一台机器上吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!