3 Copyright (c) Alex Ionescu. All rights reserved.
11 Function definitions for the Configuration Manager.
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
35 _In_reads_(Count
) PHANDLE KeyArray
44 _IRQL_requires_max_(PASSIVE_LEVEL
)
49 _Out_ PHANDLE KeyHandle
,
50 _In_ ACCESS_MASK DesiredAccess
,
51 _In_ POBJECT_ATTRIBUTES ObjectAttributes
,
52 _Reserved_ ULONG TitleIndex
,
53 _In_opt_ PUNICODE_STRING Class
,
54 _In_ ULONG CreateOptions
,
55 _Out_opt_ PULONG Disposition
69 _In_ HANDLE KeyHandle
,
70 _In_ PUNICODE_STRING ValueName
77 _In_ HANDLE KeyHandle
,
79 _In_ KEY_INFORMATION_CLASS KeyInformationClass
,
80 _Out_bytecap_(Length
) PVOID KeyInformation
,
82 _Out_ PULONG ResultLength
85 _IRQL_requires_max_(PASSIVE_LEVEL
)
86 _When_(Length
== 0, _Post_satisfies_(return < 0))
87 _When_(Length
> 0, _Post_satisfies_(return <= 0))
92 _In_ HANDLE KeyHandle
,
94 _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
,
95 _Out_writes_bytes_opt_(Length
) PVOID KeyValueInformation
,
97 _Out_ PULONG ResultLength
104 _In_ HANDLE KeyHandle
111 _In_ ULONG Reserved1
,
112 _In_ ULONG Reserved2
,
113 _Out_ PPLUGPLAY_EVENT_BLOCK Buffer
,
114 _In_ ULONG BufferSize
120 NtInitializeRegistry(
128 _In_ POBJECT_ATTRIBUTES KeyObjectAttributes
,
129 _In_ POBJECT_ATTRIBUTES FileObjectAttributes
136 _In_ POBJECT_ATTRIBUTES KeyObjectAttributes
,
137 _In_ POBJECT_ATTRIBUTES FileObjectAttributes
,
144 _In_ POBJECT_ATTRIBUTES TargetKey
,
145 _In_ POBJECT_ATTRIBUTES SourceFile
,
147 _In_ HANDLE TrustClassKey
152 NtLockProductActivationKeys(
153 _In_ PULONG pPrivateVer
,
154 _In_ PULONG pSafeMode
160 _In_ HANDLE KeyHandle
167 _In_ HANDLE KeyHandle
,
169 _In_opt_ PIO_APC_ROUTINE ApcRoutine
,
170 _In_opt_ PVOID ApcContext
,
171 _Out_ PIO_STATUS_BLOCK IoStatusBlock
,
172 _In_ ULONG CompletionFilter
,
173 _In_ BOOLEAN Asynchroneous
,
174 _Out_bytecap_(Length
) PVOID ChangeBuffer
,
176 _In_ BOOLEAN WatchSubtree
183 NtNotifyChangeMultipleKeys(
184 _In_ HANDLE MasterKeyHandle
,
185 _In_opt_ ULONG Count
,
186 _In_reads_opt_(Count
) OBJECT_ATTRIBUTES SubordinateObjects
[],
187 _In_opt_ HANDLE Event
,
188 _In_opt_ PIO_APC_ROUTINE ApcRoutine
,
189 _In_opt_ PVOID ApcContext
,
190 _Out_ PIO_STATUS_BLOCK IoStatusBlock
,
191 _In_ ULONG CompletionFilter
,
192 _In_ BOOLEAN WatchTree
,
193 _Out_writes_bytes_opt_(BufferSize
) PVOID Buffer
,
194 _In_ ULONG BufferSize
,
195 _In_ BOOLEAN Asynchronous
202 _Out_ PHANDLE KeyHandle
,
203 _In_ ACCESS_MASK DesiredAccess
,
204 _In_ POBJECT_ATTRIBUTES ObjectAttributes
211 _In_ PLUGPLAY_CONTROL_CLASS PlugPlayControlClass
,
212 _Inout_ PVOID Buffer
,
213 _In_ ULONG BufferSize
220 _In_ HANDLE KeyHandle
,
221 _In_ KEY_INFORMATION_CLASS KeyInformationClass
,
222 _Out_bytecap_(Length
) PVOID KeyInformation
,
224 _Out_ PULONG ResultLength
231 NtQueryMultipleValueKey(
232 _In_ HANDLE KeyHandle
,
233 _Inout_updates_(EntryCount
) PKEY_VALUE_ENTRY ValueEntries
,
234 _In_ ULONG EntryCount
,
235 _Out_writes_bytes_(*BufferLength
) PVOID ValueBuffer
,
236 _Inout_ PULONG BufferLength
,
237 _Out_opt_ PULONG RequiredBufferLength
243 _In_ POBJECT_ATTRIBUTES TargetKey
,
244 _Out_ PULONG HandleCount
249 NtQueryOpenSubKeysEx(
250 _In_ POBJECT_ATTRIBUTES TargetKey
,
251 _In_ ULONG BufferLength
,
253 _In_ PULONG RequiredSize
256 _IRQL_requires_max_(PASSIVE_LEVEL
)
257 _When_(Length
== 0, _Post_satisfies_(return < 0))
258 _When_(Length
> 0, _Post_satisfies_(return <= 0))
263 _In_ HANDLE KeyHandle
,
264 _In_ PUNICODE_STRING ValueName
,
265 _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
,
266 _Out_writes_bytes_opt_(Length
) PVOID KeyValueInformation
,
268 _Out_ PULONG ResultLength
275 _In_ HANDLE KeyHandle
,
276 _In_ PUNICODE_STRING NewName
283 _In_ POBJECT_ATTRIBUTES ObjectAttributes
,
285 _In_ POBJECT_ATTRIBUTES ReplacedObjectAttributes
292 _In_ HANDLE KeyHandle
,
293 _In_ HANDLE FileHandle
,
294 _In_ ULONG RestoreFlags
301 _In_ HANDLE KeyHandle
,
302 _In_ HANDLE FileHandle
309 _In_ HANDLE KeyHandle
,
310 _In_ HANDLE FileHandle
,
318 _In_ HANDLE HighPrecedenceKeyHandle
,
319 _In_ HANDLE LowPrecedenceKeyHandle
,
320 _In_ HANDLE FileHandle
328 _In_ HANDLE KeyHandle
,
329 _In_ _Strict_type_match_
330 KEY_SET_INFORMATION_CLASS KeySetInformationClass
,
331 _In_reads_bytes_(KeySetInformationLength
) PVOID KeySetInformation
,
332 _In_ ULONG KeySetInformationLength
339 _In_ HANDLE KeyHandle
,
340 _In_ PUNICODE_STRING ValueName
,
341 _In_opt_ ULONG TitleIndex
,
351 _In_ POBJECT_ATTRIBUTES KeyObjectAttributes
357 _In_ POBJECT_ATTRIBUTES TargetKey
,
364 _In_ POBJECT_ATTRIBUTES TargetKey
,
368 #ifdef NTOS_MODE_USER
369 _IRQL_requires_max_(PASSIVE_LEVEL
)
374 _Out_ PHANDLE KeyHandle
,
375 _In_ ACCESS_MASK DesiredAccess
,
376 _In_ POBJECT_ATTRIBUTES ObjectAttributes
,
377 _Reserved_ ULONG TitleIndex
,
378 _In_opt_ PUNICODE_STRING Class
,
379 _In_ ULONG CreateOptions
,
380 _Out_opt_ PULONG Disposition
387 _In_ HANDLE KeyHandle
394 _In_ HANDLE KeyHandle
,
395 _In_ PUNICODE_STRING ValueName
402 _In_ HANDLE KeyHandle
,
404 _In_ KEY_INFORMATION_CLASS KeyInformationClass
,
405 _Out_bytecap_(Length
) PVOID KeyInformation
,
407 _Out_ PULONG ResultLength
410 _IRQL_requires_max_(PASSIVE_LEVEL
)
411 _When_(Length
== 0, _Post_satisfies_(return < 0))
412 _When_(Length
> 0, _Post_satisfies_(return <= 0))
417 _In_ HANDLE KeyHandle
,
419 _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
,
420 _Out_writes_bytes_opt_(Length
) PVOID KeyValueInformation
,
422 _Out_ PULONG ResultLength
429 _In_ HANDLE KeyHandle
436 _In_ ULONG Reserved1
,
437 _In_ ULONG Reserved2
,
438 _Out_bytecap_(BufferSize
) PPLUGPLAY_EVENT_BLOCK Buffer
,
439 _In_ ULONG BufferSize
446 _In_ POBJECT_ATTRIBUTES KeyObjectAttributes
,
447 _In_ POBJECT_ATTRIBUTES FileObjectAttributes
454 _In_ POBJECT_ATTRIBUTES KeyObjectAttributes
,
455 _In_ POBJECT_ATTRIBUTES FileObjectAttributes
,
463 _In_ HANDLE KeyHandle
,
465 _In_opt_ PIO_APC_ROUTINE ApcRoutine
,
466 _In_opt_ PVOID ApcContext
,
467 _Out_ PIO_STATUS_BLOCK IoStatusBlock
,
468 _In_ ULONG CompletionFilter
,
469 _In_ BOOLEAN Asynchroneous
,
470 _Out_bytecap_(Length
) PVOID ChangeBuffer
,
472 _In_ BOOLEAN WatchSubtree
479 _Out_ PHANDLE KeyHandle
,
480 _In_ ACCESS_MASK DesiredAccess
,
481 _In_ POBJECT_ATTRIBUTES ObjectAttributes
488 _In_ PLUGPLAY_CONTROL_CLASS PlugPlayControlClass
,
489 _Inout_bytecap_(BufferSize
) PVOID Buffer
,
490 _In_ ULONG BufferSize
497 _In_ HANDLE KeyHandle
,
498 _In_ KEY_INFORMATION_CLASS KeyInformationClass
,
499 _Out_bytecap_(Length
) PVOID KeyInformation
,
501 _Out_ PULONG ResultLength
507 ZwQueryMultipleValueKey(
508 _In_ HANDLE KeyHandle
,
509 _Inout_ PKEY_VALUE_ENTRY ValueList
,
510 _In_ ULONG NumberOfValues
,
511 _Out_bytecap_(*Length
) PVOID Buffer
,
512 _Inout_ PULONG Length
,
513 _Out_ PULONG ReturnLength
516 _IRQL_requires_max_(PASSIVE_LEVEL
)
517 _When_(Length
== 0, _Post_satisfies_(return < 0))
518 _When_(Length
> 0, _Post_satisfies_(return <= 0))
523 _In_ HANDLE KeyHandle
,
524 _In_ PUNICODE_STRING ValueName
,
525 _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
,
526 _Out_writes_bytes_opt_(Length
) PVOID KeyValueInformation
,
528 _Out_ PULONG ResultLength
535 _In_ POBJECT_ATTRIBUTES ObjectAttributes
,
537 _In_ POBJECT_ATTRIBUTES ReplacedObjectAttributes
544 _In_ HANDLE KeyHandle
,
545 _In_ HANDLE FileHandle
,
546 _In_ ULONG RestoreFlags
553 _In_ HANDLE KeyHandle
,
554 _In_ HANDLE FileHandle
561 _In_ HANDLE KeyHandle
,
562 _In_ HANDLE FileHandle
,
570 _In_ HANDLE KeyHandle
,
571 _In_ KEY_SET_INFORMATION_CLASS KeyInformationClass
,
572 _In_bytecount_(KeyInformationLength
) PVOID KeyInformation
,
573 _In_ ULONG KeyInformationLength
580 _In_ HANDLE KeyHandle
,
581 _In_ PUNICODE_STRING ValueName
,
582 _In_opt_ ULONG TitleIndex
,
584 _In_bytecount_(DataSize
) PVOID Data
,
592 ZwInitializeRegistry(
600 _In_ POBJECT_ATTRIBUTES KeyObjectAttributes