admin管理员组文章数量:1794759
KEY
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 (.asp?url=/library/en-us/dnanchor/html/64bitwindows.asp). One particular piece information about registry is htere (.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 (.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.
本文标签: KEY
版权声明:本文标题:KEY 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1700035351a391698.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论