阅读:1528回复:3
Conversion of Predefined Keys
Conversion of Predefined Keys
(by ks12345 (Normal user) Apr 18 2007, 04:38 (UTC+8) ) Hi, I am tring to call some registry service routines in the SSDT directly, like NtCreateKey, NtOpenKey, etc. But I always need to convert the predefined keys (HKEY_LOCAL_MACHINE)into a absolute key path (\REGISTRY\MACHINE\). I think there may be a much better method. Could anyone tell me? Thank you for you attention! 每次调用都要把 HKEY_LOCAL_MACHINE 之类的转换为绝对路径 \REGISTRY\MACHINE\ 等,各位大虾有什么好点的办法木有? 感谢先! ( HKEY_LOCAL_MACHINE 之类的预定义命令貌似不能用与初始化 OBJECT_ATTRIBUTES 的 RootDirectory 字段,每次都返回 STATUS_INVALID_HANDLE) |
|
|
沙发#
发布于:2007-04-20 07:53
自己手动换一下也花不了几行代码
|
|
|
板凳#
发布于:2007-04-24 09:43
switch((ULONG)hKey)
{ case HKEY_LOCAL_MACHINE: lpRoot = L"\\REGISTRY\\MACHINE\\"; break; case HKEY_CURRENT_CONFIG: lpRoot = L"\\REGISTRY\\MACHINE\\SYSTEM\\CURRENTCONTROLSET\\HARDWARE PROFILES\\CURRENT\\"; break; case HKEY_USERS: lpRoot = L"\\REGISTRY\\USER\\"; break; case HKEY_CLASSES_ROOT: lpRoot = L"\\REGISTRY\\MACHINE\\SOFTWARE\\CLASSES\\"; break; default: break; } 请问下: HKEY_CURRENT_USER 转换的路径是什么? |
|
|
地板#
发布于:2007-04-26 12:01
HKEY_CURRENT_USER 转换的路径已经搞定,暂时告一段落 :)
http://bbs.driverdevelop.com/htm_data/16/0704/101129.html |
|
|