2006-05-10 17:47:44 +00:00
|
|
|
/*++ NDK Version: 0098
|
2006-05-05 18:13:26 +00:00
|
|
|
|
|
|
|
Copyright (c) Alex Ionescu. All rights reserved.
|
|
|
|
|
|
|
|
Header Name:
|
|
|
|
|
|
|
|
cmfuncs.h
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
|
|
|
|
Function definitions for the Configuration Manager.
|
|
|
|
|
|
|
|
Author:
|
|
|
|
|
2006-05-10 17:47:44 +00:00
|
|
|
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
|
2006-05-05 18:13:26 +00:00
|
|
|
|
|
|
|
--*/
|
|
|
|
|
|
|
|
#ifndef _CMFUNCS_H
|
|
|
|
#define _CMFUNCS_H
|
|
|
|
|
|
|
|
//
|
|
|
|
// Dependencies
|
|
|
|
//
|
|
|
|
#include <umtypes.h>
|
2007-12-05 18:21:11 +00:00
|
|
|
#include <cmtypes.h>
|
2006-05-05 18:13:26 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Native calls
|
|
|
|
//
|
2006-10-23 21:19:15 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtCompactKeys(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ ULONG Count,
|
|
|
|
_In_reads_(Count) PHANDLE KeyArray
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtCompressKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE Key
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
2013-01-22 22:51:51 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
NTSYSAPI
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtCreateKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_Out_ PHANDLE KeyHandle,
|
|
|
|
_In_ ACCESS_MASK DesiredAccess,
|
|
|
|
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
|
2013-01-22 22:51:51 +00:00
|
|
|
_Reserved_ ULONG TitleIndex,
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_opt_ PUNICODE_STRING Class,
|
|
|
|
_In_ ULONG CreateOptions,
|
2013-01-22 22:51:51 +00:00
|
|
|
_Out_opt_ PULONG Disposition
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtDeleteKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtDeleteValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ PUNICODE_STRING ValueName
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtEnumerateKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ ULONG Index,
|
|
|
|
_In_ KEY_INFORMATION_CLASS KeyInformationClass,
|
|
|
|
_Out_bytecap_(Length) PVOID KeyInformation,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_Out_ PULONG ResultLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2013-01-22 22:51:51 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
_When_(Length == 0, _Post_satisfies_(return < 0))
|
|
|
|
_When_(Length > 0, _Post_satisfies_(return <= 0))
|
|
|
|
NTSYSAPI
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtEnumerateValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ ULONG Index,
|
|
|
|
_In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
|
2013-01-22 22:51:51 +00:00
|
|
|
_Out_writes_bytes_opt_(Length) PVOID KeyValueInformation,
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ ULONG Length,
|
|
|
|
_Out_ PULONG ResultLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtFlushKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtGetPlugPlayEvent(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ ULONG Reserved1,
|
|
|
|
_In_ ULONG Reserved2,
|
|
|
|
_Out_ PPLUGPLAY_EVENT_BLOCK Buffer,
|
|
|
|
_In_ ULONG BufferSize
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtInitializeRegistry(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ USHORT Flag
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtLoadKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES KeyObjectAttributes,
|
|
|
|
_In_ POBJECT_ATTRIBUTES FileObjectAttributes
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtLoadKey2(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES KeyObjectAttributes,
|
|
|
|
_In_ POBJECT_ATTRIBUTES FileObjectAttributes,
|
|
|
|
_In_ ULONG Flags
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2006-10-23 21:19:15 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtLoadKeyEx(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES TargetKey,
|
|
|
|
_In_ POBJECT_ATTRIBUTES SourceFile,
|
|
|
|
_In_ ULONG Flags,
|
|
|
|
_In_ HANDLE TrustClassKey
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtLockProductActivationKeys(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ PULONG pPrivateVer,
|
|
|
|
_In_ PULONG pSafeMode
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtLockRegistryKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtNotifyChangeKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ HANDLE Event,
|
|
|
|
_In_opt_ PIO_APC_ROUTINE ApcRoutine,
|
|
|
|
_In_opt_ PVOID ApcContext,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
|
|
|
|
_In_ ULONG CompletionFilter,
|
|
|
|
_In_ BOOLEAN Asynchroneous,
|
|
|
|
_Out_bytecap_(Length) PVOID ChangeBuffer,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_In_ BOOLEAN WatchSubtree
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2015-03-15 00:05:50 +00:00
|
|
|
__kernel_entry
|
|
|
|
NTSYSCALLAPI
|
2006-10-23 21:19:15 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtNotifyChangeMultipleKeys(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE MasterKeyHandle,
|
2015-03-15 00:05:50 +00:00
|
|
|
_In_opt_ ULONG Count,
|
|
|
|
_In_reads_opt_(Count) OBJECT_ATTRIBUTES SubordinateObjects[],
|
|
|
|
_In_opt_ HANDLE Event,
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_opt_ PIO_APC_ROUTINE ApcRoutine,
|
|
|
|
_In_opt_ PVOID ApcContext,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
|
|
|
|
_In_ ULONG CompletionFilter,
|
|
|
|
_In_ BOOLEAN WatchTree,
|
2015-03-15 00:05:50 +00:00
|
|
|
_Out_writes_bytes_opt_(BufferSize) PVOID Buffer,
|
|
|
|
_In_ ULONG BufferSize,
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ BOOLEAN Asynchronous
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtOpenKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_Out_ PHANDLE KeyHandle,
|
|
|
|
_In_ ACCESS_MASK DesiredAccess,
|
|
|
|
_In_ POBJECT_ATTRIBUTES ObjectAttributes
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtPlugPlayControl(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
|
|
|
|
_Inout_ PVOID Buffer,
|
|
|
|
_In_ ULONG BufferSize
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtQueryKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ KEY_INFORMATION_CLASS KeyInformationClass,
|
|
|
|
_Out_bytecap_(Length) PVOID KeyInformation,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_Out_ PULONG ResultLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2015-03-15 00:05:50 +00:00
|
|
|
__kernel_entry
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtQueryMultipleValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
2015-03-15 00:05:50 +00:00
|
|
|
_Inout_updates_(EntryCount) PKEY_VALUE_ENTRY ValueEntries,
|
|
|
|
_In_ ULONG EntryCount,
|
|
|
|
_Out_writes_bytes_(*BufferLength) PVOID ValueBuffer,
|
|
|
|
_Inout_ PULONG BufferLength,
|
|
|
|
_Out_opt_ PULONG RequiredBufferLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2006-10-23 21:19:15 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtQueryOpenSubKeys(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES TargetKey,
|
|
|
|
_Out_ PULONG HandleCount
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtQueryOpenSubKeysEx(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES TargetKey,
|
|
|
|
_In_ ULONG BufferLength,
|
|
|
|
_In_ PVOID Buffer,
|
|
|
|
_In_ PULONG RequiredSize
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
2013-01-22 22:51:51 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
_When_(Length == 0, _Post_satisfies_(return < 0))
|
|
|
|
_When_(Length > 0, _Post_satisfies_(return <= 0))
|
|
|
|
NTSYSAPI
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtQueryValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ PUNICODE_STRING ValueName,
|
|
|
|
_In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
|
2013-01-22 22:51:51 +00:00
|
|
|
_Out_writes_bytes_opt_(Length) PVOID KeyValueInformation,
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ ULONG Length,
|
|
|
|
_Out_ PULONG ResultLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2008-01-05 17:28:07 +00:00
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtRenameKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
2015-03-15 00:05:50 +00:00
|
|
|
_In_ PUNICODE_STRING NewName
|
2008-01-05 17:28:07 +00:00
|
|
|
);
|
|
|
|
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtReplaceKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
|
|
|
|
_In_ HANDLE Key,
|
|
|
|
_In_ POBJECT_ATTRIBUTES ReplacedObjectAttributes
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtRestoreKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ HANDLE FileHandle,
|
|
|
|
_In_ ULONG RestoreFlags
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtSaveKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ HANDLE FileHandle
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtSaveKeyEx(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ HANDLE FileHandle,
|
|
|
|
_In_ ULONG Flags
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2006-10-23 21:19:15 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtSaveMergedKeys(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE HighPrecedenceKeyHandle,
|
|
|
|
_In_ HANDLE LowPrecedenceKeyHandle,
|
|
|
|
_In_ HANDLE FileHandle
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
2015-03-15 00:05:50 +00:00
|
|
|
__kernel_entry
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtSetInformationKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
2015-03-15 00:05:50 +00:00
|
|
|
_In_ _Strict_type_match_
|
|
|
|
KEY_SET_INFORMATION_CLASS KeySetInformationClass,
|
|
|
|
_In_reads_bytes_(KeySetInformationLength) PVOID KeySetInformation,
|
|
|
|
_In_ ULONG KeySetInformationLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtSetValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ PUNICODE_STRING ValueName,
|
|
|
|
_In_opt_ ULONG TitleIndex,
|
|
|
|
_In_ ULONG Type,
|
|
|
|
_In_ PVOID Data,
|
|
|
|
_In_ ULONG DataSize
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtUnloadKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES KeyObjectAttributes
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2006-10-23 21:19:15 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtUnloadKey2(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES TargetKey,
|
|
|
|
_In_ ULONG Flags
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtUnloadKeyEx(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES TargetKey,
|
|
|
|
_In_ HANDLE Event
|
2006-10-23 21:19:15 +00:00
|
|
|
);
|
|
|
|
|
2006-05-05 18:13:26 +00:00
|
|
|
#ifdef NTOS_MODE_USER
|
2013-01-22 22:51:51 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwCreateKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_Out_ PHANDLE KeyHandle,
|
|
|
|
_In_ ACCESS_MASK DesiredAccess,
|
|
|
|
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
|
2013-01-22 22:51:51 +00:00
|
|
|
_Reserved_ ULONG TitleIndex,
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_opt_ PUNICODE_STRING Class,
|
|
|
|
_In_ ULONG CreateOptions,
|
2013-01-22 22:51:51 +00:00
|
|
|
_Out_opt_ PULONG Disposition
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwDeleteKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwDeleteValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ PUNICODE_STRING ValueName
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwEnumerateKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ ULONG Index,
|
|
|
|
_In_ KEY_INFORMATION_CLASS KeyInformationClass,
|
|
|
|
_Out_bytecap_(Length) PVOID KeyInformation,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_Out_ PULONG ResultLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2013-01-22 22:51:51 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
_When_(Length == 0, _Post_satisfies_(return < 0))
|
|
|
|
_When_(Length > 0, _Post_satisfies_(return <= 0))
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwEnumerateValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ ULONG Index,
|
|
|
|
_In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
|
2013-01-22 22:51:51 +00:00
|
|
|
_Out_writes_bytes_opt_(Length) PVOID KeyValueInformation,
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ ULONG Length,
|
|
|
|
_Out_ PULONG ResultLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwFlushKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwGetPlugPlayEvent(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ ULONG Reserved1,
|
|
|
|
_In_ ULONG Reserved2,
|
|
|
|
_Out_bytecap_(BufferSize) PPLUGPLAY_EVENT_BLOCK Buffer,
|
|
|
|
_In_ ULONG BufferSize
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwLoadKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES KeyObjectAttributes,
|
|
|
|
_In_ POBJECT_ATTRIBUTES FileObjectAttributes
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwLoadKey2(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES KeyObjectAttributes,
|
|
|
|
_In_ POBJECT_ATTRIBUTES FileObjectAttributes,
|
|
|
|
_In_ ULONG Flags
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwNotifyChangeKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ HANDLE Event,
|
|
|
|
_In_opt_ PIO_APC_ROUTINE ApcRoutine,
|
|
|
|
_In_opt_ PVOID ApcContext,
|
|
|
|
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
|
|
|
|
_In_ ULONG CompletionFilter,
|
|
|
|
_In_ BOOLEAN Asynchroneous,
|
|
|
|
_Out_bytecap_(Length) PVOID ChangeBuffer,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_In_ BOOLEAN WatchSubtree
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwOpenKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_Out_ PHANDLE KeyHandle,
|
|
|
|
_In_ ACCESS_MASK DesiredAccess,
|
|
|
|
_In_ POBJECT_ATTRIBUTES ObjectAttributes
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwPlugPlayControl(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
|
|
|
|
_Inout_bytecap_(BufferSize) PVOID Buffer,
|
|
|
|
_In_ ULONG BufferSize
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwQueryKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ KEY_INFORMATION_CLASS KeyInformationClass,
|
|
|
|
_Out_bytecap_(Length) PVOID KeyInformation,
|
|
|
|
_In_ ULONG Length,
|
|
|
|
_Out_ PULONG ResultLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwQueryMultipleValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_Inout_ PKEY_VALUE_ENTRY ValueList,
|
|
|
|
_In_ ULONG NumberOfValues,
|
|
|
|
_Out_bytecap_(*Length) PVOID Buffer,
|
|
|
|
_Inout_ PULONG Length,
|
|
|
|
_Out_ PULONG ReturnLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2013-01-22 22:51:51 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
_When_(Length == 0, _Post_satisfies_(return < 0))
|
|
|
|
_When_(Length > 0, _Post_satisfies_(return <= 0))
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwQueryValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ PUNICODE_STRING ValueName,
|
|
|
|
_In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
|
2013-01-22 22:51:51 +00:00
|
|
|
_Out_writes_bytes_opt_(Length) PVOID KeyValueInformation,
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ ULONG Length,
|
|
|
|
_Out_ PULONG ResultLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwReplaceKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
|
|
|
|
_In_ HANDLE Key,
|
|
|
|
_In_ POBJECT_ATTRIBUTES ReplacedObjectAttributes
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwRestoreKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ HANDLE FileHandle,
|
|
|
|
_In_ ULONG RestoreFlags
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwSaveKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ HANDLE FileHandle
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwSaveKeyEx(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ HANDLE FileHandle,
|
|
|
|
_In_ ULONG Flags
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwSetInformationKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ KEY_SET_INFORMATION_CLASS KeyInformationClass,
|
|
|
|
_In_bytecount_(KeyInformationLength) PVOID KeyInformation,
|
|
|
|
_In_ ULONG KeyInformationLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwSetValueKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE KeyHandle,
|
|
|
|
_In_ PUNICODE_STRING ValueName,
|
|
|
|
_In_opt_ ULONG TitleIndex,
|
|
|
|
_In_ ULONG Type,
|
|
|
|
_In_bytecount_(DataSize) PVOID Data,
|
|
|
|
_In_ ULONG DataSize
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
#endif
|
|
|
|
|
2007-08-23 19:20:28 +00:00
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwInitializeRegistry(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ USHORT Flag
|
2007-08-23 19:20:28 +00:00
|
|
|
);
|
|
|
|
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSYSAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwUnloadKey(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POBJECT_ATTRIBUTES KeyObjectAttributes
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
#endif
|