KEY_WOW64_64KEY and KEY_WOW64_32KEY

KEY_WOW64_64KEY and KEY_WOW64_32KEY
★★★★★★★★★★★★★★★
April 5, 2004By Junfeng Zhang1
0
0
0
This is really about Win32 on Win64, or Windows on Windows, or short for WOW.




MSDN has many information about 64 bits Windows here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/64bitwindows.asp). One particular piece information about registry is htere (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win64/win64/registry_redirector.asp). For the most part, there are two registry hives, 64 bit hive and 32bit hive. Applications running under WOW use 32bit hive, and native 64 bit applications use 64 bit hive.




If an application running under WOW wants to use 64 bit hive, it has to specify KEY_WOW64_64KEY in RegOpenKeyEx/RegCreateKeyEx. This is documented here (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/registry_key_security_and_access_rights.asp).




If a registry handle hKey is opened with KEY_WOW64_64KEY under WOW, and you want to open its subkey, you still have to pass KEY_WOW64_64KEY to RegOpenKeyEx. The WOW system does not remember hKey is opened with KEY_WOW64_64KEY. If you don’t pass KEY_WOW64_64KEY to RegOpenKeyEx, WOW will try to open the subkey in 32bit hive, and will likely fail to find the subkey if the subkey does not exist in 32bit hive.




KEY_WOW64_32KEY is about native 64 bit applications use 32bit hive. And it has to follow the same rule.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值