Windows 64 位注册表与32 位注册表 [英] Windows 64-bit registry v.s. 32-bit registry

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

问题描述

我听说在 Windows x64 架构上,为了支持同时运行 x86 和 x64 应用程序,有两套单独/不同的 Windows 注册表——一套用于 x86 应用程序访问,另一套用于 x64 应用程序访问?例如,如果一个 COM 在 x86 注册表中注册了 CLSID,那么 x64 应用程序将永远无法通过 CLSID 访问 COM 组件,因为 x86/x64 有不同的注册表?

I heard on Windows x64 architecture, in order to support to run both x86 and x64 application, there is two separate/different sets of Windows registry -- one for x86 application to access and the other for x64 application to access? For example, if a COM registers CLSID in the x86 set of registry, then x64 application will never be able to access the COM component by CLSID, because x86/x64 have different sets of registry?

那么,我的问题是我对上述示例的理解是否正确?我还想获得更多文档来学习这个主题,关于 x64 架构上的两组不同的注册表.(我做了一些搜索,但没有找到任何有价值的信息.)

So, my question is whether my understanding of the above sample is correct? I also want to get some more documents to learn this topic, about the two different sets of registry on x64 architecture. (I did some search, but not found any valuable information.)

推荐答案

我不久前遇到了这个问题.简短的回答是,如果您在 64 位机器上运行 32 位应用程序,那么它的注册表项位于 Wow6432Node 下.

I ran into this issue not long ago. The short answer is that if you run a 32 bit application on a 64 bit machine then it's registry keys are located under a Wow6432Node.

例如,假设您有一个应用程序将其注册表信息存储在:

For example, let's say you have an application that stores its registry information under:

HKEY_LOCAL_MACHINESOFTWARECompanyX

如果您将应用程序编译为 64 位二进制文​​件并在 64 位机器上运行它,则注册表项位于上面的位置.但是,如果您将应用程序编译为 32 位二进制文​​件并在 64 位机器上运行它,那么您的注册表信息现在位于此处:

If you compile your application as a 64 bit binary and run it on a 64 bit machine then the registry keys are in the location above. However, if you compile your application as a 32 bit binary and run it on a 64 bit machine then your registry information is now located here:

HKEY_LOCAL_MACHINESOFTWAREWow6432NodeCompanyX

这意味着,如果您在同一台机器上同时运行 32 位和 64 位版本的应用程序,那么它们将分别查看一组不同的注册表项.

This means that if you run both the 32 bit and 64 bit versions of your application on the same machine then they will each be looking at a different set of registry keys.

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

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