ZwQueryValueKey routine
来源:互联网 发布:怎么设置淘宝店logo 编辑:程序博客网 时间:2024/06/06 15:12
ZwQueryValueKey routine
ZwQueryValueKey 返回一个注册表键的值。
Syntax
NTSTATUS ZwQueryValueKey( _In_ HANDLE KeyHandle, _In_ PUNICODE_STRING ValueName, _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, _Out_opt_ PVOID KeyValueInformation, _In_ ULONG Length, _Out_ PULONG ResultLength);
Parameters
KeyHandle [in]
注册表键句柄,希望从这个键获取值。由 ZwCreateKey 或ZwOpenKey创建了这个句柄。
ValueName [in]
指向(意图从这个子键获取值的)子键(value entry)的名字
KeyValueInformationClass [in]
一个 KEY_VALUE_INFORMATION_CLASS 值,该值决定了返回到KeyValueInformation缓冲区 的数据的信息类型。
KeyValueInformation [out, optional]
指向用户自己申请的内存缓冲区,用于接收请求的结果。
Length [in]
以字节为单位的size,指定KeyValueInformation 缓冲区的长度。
ResultLength [out]
指向接收返回大小的变量的一个指针。大小以字节为单位。如果 ZwQueryValueKey 返回STATUS_SUCCESS, 调用者可以使用这个变量的值,用于确定返回了多少数据。如果返回了STATUS_BUFFER_OVERFLOW or STATUS_BUFFER_TOO_SMALL, 调用者可以使用这个值用来确定需要多少字节能存放返回值(key的信息);
Return value
ZwQueryValueKey 成功返回STATUS_SUCCESS ,失败返回一个合适的错误码,可能的错误码包括:
Return code
Description
STATUS_OBJECT_NAME_NOT_FOUND
注册表值不可用。
STATUS_BUFFER_OVERFLOW
提供的缓冲区过小仅有部分数据写入到缓冲区中。 并写入需要的最小值到*ResultLength。
STATUS_BUFFER_TOO_SMALL
缓冲区过小且无数据写入到缓冲区。*ResultLength 被设置为需要的最小值。
STATUS_INVALID_PARAMETER
KeyInformationClass 不是有效的 KEY_VALUE_INFORMATION_CLASS 值
Warning 如果指定KeyValueInformationClass为 KeyValueBasicInformation , Windows 98 and Windows Me 返回 STATUS_SUCCESS 即使是键或者值不存在。
Remarks
传给 ZwQueryValueKey 的KeyHandle必须已经以KEY_QUERY_VALUE访问打开. 可以使用 KEY_QUERY_VALUE, KEY_READ, or KEY_ALL_ACCESS 作为 DesiredAccess 参数调用函数 ZwCreateKey or ZwOpenKey.
更多操作注册表键的信息见Using the Registry in a Driver.
Note 如调用发生在用户模式,您应当使用"NtQueryValueKey" 代替"ZwQueryValueKey".
Requirements
Target platform
Universal
Version
Available starting with Windows 2000.
Header
Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)
Library
NtosKrnl.lib
DLL
NtosKrnl.exe
IRQL
PASSIVE_LEVEL
DDI compliance rules
IrqlZwPassive, PowerIrpDDis, ZwRegistryCreate, ZwRegistryOpen, HwStorPortProhibitedDDIs,ZwRegistryCreate(storport), ZwRegistryOpen(storport)
See also
KEY_VALUE_BASIC_INFORMATION
KEY_VALUE_FULL_INFORMATION
KEY_VALUE_INFORMATION_CLASS
KEY_VALUE_PARTIAL_INFORMATION
ZwCreateKey
ZwEnumerateValueKey
ZwOpenKey
- ZwQueryValueKey routine
- ZwQueryValueKey
- python routine
- RegistryCallback routine
- RegistryCallback routine
- ZwReadFile routine
- ZwWriteFile routine
- RtlFreeUnicodeString routine
- RtlUpcaseUnicodeString routine
- RtlAnsiStringToUnicodeSize routine
- RtlCompareUnicodeString routine
- RtlCopyUnicodeString routine
- RtlEqualUnicodeString routine
- MmGetSystemRoutineAddress routine
- ExInitializeResourceLite routine
- ExDeleteResourceLite routine
- ExAcquireResourceSharedLite routine
- ExAcquireResourceExclusiveLite routine
- android snackbar 使用
- [一般图最大匹配 带花树] BZOJ 4405
- android的armeabi和armeabi-v7a
- 黄迪明9.1
- kafka2.9.2的分布式集群安装和demo(java api)测试
- ZwQueryValueKey routine
- 黄迪明9.2
- 黄迪明9.3
- Ceph Calamari 安装(Ubuntu14.04)
- hdu1977 2010.3.5
- 求组合数
- UFLDL教程之一 (Sparse Autoencoder练习)
- hdu1158 2010.3.5
- 黄迪明9.4