Fix NtQueryOpenSubKeys prototype.
[reactos.git] / reactos / include / ndk / cmfuncs.h
1 /*++ NDK Version: 0098
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 cmfuncs.h
8
9 Abstract:
10
11 Function definitions for the Configuration Manager.
12
13 Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17 --*/
18
19 #ifndef _CMFUNCS_H
20 #define _CMFUNCS_H
21
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26 #include <cmtypes.h>
27
28 //
29 // Native calls
30 //
31 NTSTATUS
32 NTAPI
33 NtCompactKeys(
34 IN ULONG Count,
35 IN PHANDLE KeyArray
36 );
37
38 NTSTATUS
39 NTAPI
40 NtCompressKey(
41 IN HANDLE Key
42 );
43
44 NTSYSCALLAPI
45 NTSTATUS
46 NTAPI
47 NtCreateKey(
48 OUT PHANDLE KeyHandle,
49 IN ACCESS_MASK DesiredAccess,
50 IN POBJECT_ATTRIBUTES ObjectAttributes,
51 IN ULONG TitleIndex,
52 IN PUNICODE_STRING Class OPTIONAL,
53 IN ULONG CreateOptions,
54 IN PULONG Disposition OPTIONAL
55 );
56
57 NTSYSCALLAPI
58 NTSTATUS
59 NTAPI
60 NtDeleteKey(
61 IN HANDLE KeyHandle
62 );
63
64 NTSYSCALLAPI
65 NTSTATUS
66 NTAPI
67 NtDeleteValueKey(
68 IN HANDLE KeyHandle,
69 IN PUNICODE_STRING ValueName
70 );
71
72 NTSYSCALLAPI
73 NTSTATUS
74 NTAPI
75 NtEnumerateKey(
76 IN HANDLE KeyHandle,
77 IN ULONG Index,
78 IN KEY_INFORMATION_CLASS KeyInformationClass,
79 OUT PVOID KeyInformation,
80 IN ULONG Length,
81 OUT PULONG ResultLength
82 );
83
84 NTSYSCALLAPI
85 NTSTATUS
86 NTAPI
87 NtEnumerateValueKey(
88 IN HANDLE KeyHandle,
89 IN ULONG Index,
90 IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
91 OUT PVOID KeyValueInformation,
92 IN ULONG Length,
93 OUT PULONG ResultLength
94 );
95
96 NTSYSCALLAPI
97 NTSTATUS
98 NTAPI
99 NtFlushKey(
100 IN HANDLE KeyHandle
101 );
102
103 NTSYSCALLAPI
104 NTSTATUS
105 NTAPI
106 NtGetPlugPlayEvent(
107 IN ULONG Reserved1,
108 IN ULONG Reserved2,
109 OUT PPLUGPLAY_EVENT_BLOCK Buffer,
110 IN ULONG BufferSize
111 );
112
113 NTSYSCALLAPI
114 NTSTATUS
115 NTAPI
116 NtInitializeRegistry(
117 USHORT Flag
118 );
119
120 NTSYSCALLAPI
121 NTSTATUS
122 NTAPI
123 NtLoadKey(
124 IN POBJECT_ATTRIBUTES KeyObjectAttributes,
125 IN POBJECT_ATTRIBUTES FileObjectAttributes
126 );
127
128 NTSYSCALLAPI
129 NTSTATUS
130 NTAPI
131 NtLoadKey2(
132 IN POBJECT_ATTRIBUTES KeyObjectAttributes,
133 IN POBJECT_ATTRIBUTES FileObjectAttributes,
134 IN ULONG Flags
135 );
136
137 NTSTATUS
138 NTAPI
139 NtLoadKeyEx(
140 IN POBJECT_ATTRIBUTES TargetKey,
141 IN POBJECT_ATTRIBUTES SourceFile,
142 IN ULONG Flags,
143 IN HANDLE TrustClassKey
144 );
145
146 NTSTATUS
147 NTAPI
148 NtLockProductActivationKeys(
149 IN PULONG pPrivateVer,
150 IN PULONG pSafeMode
151 );
152
153 NTSTATUS
154 NTAPI
155 NtLockRegistryKey(
156 IN HANDLE KeyHandle
157 );
158
159 NTSYSCALLAPI
160 NTSTATUS
161 NTAPI
162 NtNotifyChangeKey(
163 IN HANDLE KeyHandle,
164 IN HANDLE Event,
165 IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
166 IN PVOID ApcContext OPTIONAL,
167 OUT PIO_STATUS_BLOCK IoStatusBlock,
168 IN ULONG CompletionFilter,
169 IN BOOLEAN Asynchroneous,
170 OUT PVOID ChangeBuffer,
171 IN ULONG Length,
172 IN BOOLEAN WatchSubtree
173 );
174
175 NTSTATUS
176 NTAPI
177 NtNotifyChangeMultipleKeys(
178 IN HANDLE MasterKeyHandle,
179 IN ULONG Count,
180 IN POBJECT_ATTRIBUTES SlaveObjects,
181 IN HANDLE Event,
182 IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
183 IN PVOID ApcContext OPTIONAL,
184 OUT PIO_STATUS_BLOCK IoStatusBlock,
185 IN ULONG CompletionFilter,
186 IN BOOLEAN WatchTree,
187 OUT PVOID Buffer,
188 IN ULONG Length,
189 IN BOOLEAN Asynchronous
190 );
191
192 NTSYSCALLAPI
193 NTSTATUS
194 NTAPI
195 NtOpenKey(
196 OUT PHANDLE KeyHandle,
197 IN ACCESS_MASK DesiredAccess,
198 IN POBJECT_ATTRIBUTES ObjectAttributes
199 );
200
201 NTSYSCALLAPI
202 NTSTATUS
203 NTAPI
204 NtPlugPlayControl(
205 IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
206 IN OUT PVOID Buffer,
207 IN ULONG BufferSize
208 );
209
210 NTSYSCALLAPI
211 NTSTATUS
212 NTAPI
213 NtQueryKey(
214 IN HANDLE KeyHandle,
215 IN KEY_INFORMATION_CLASS KeyInformationClass,
216 OUT PVOID KeyInformation,
217 IN ULONG Length,
218 OUT PULONG ResultLength
219 );
220
221 NTSYSCALLAPI
222 NTSTATUS
223 NTAPI
224 NtQueryMultipleValueKey(
225 IN HANDLE KeyHandle,
226 IN OUT PKEY_VALUE_ENTRY ValueList,
227 IN ULONG NumberOfValues,
228 OUT PVOID Buffer,
229 IN OUT PULONG Length,
230 OUT PULONG ReturnLength
231 );
232
233 NTSTATUS
234 NTAPI
235 NtQueryOpenSubKeys(
236 IN POBJECT_ATTRIBUTES TargetKey,
237 OUT PULONG HandleCount
238 );
239
240 NTSTATUS
241 NTAPI
242 NtQueryOpenSubKeysEx(
243 IN POBJECT_ATTRIBUTES TargetKey,
244 IN ULONG BufferLength,
245 IN PVOID Buffer,
246 IN PULONG RequiredSize
247 );
248
249 NTSYSCALLAPI
250 NTSTATUS
251 NTAPI
252 NtQueryValueKey(
253 IN HANDLE KeyHandle,
254 IN PUNICODE_STRING ValueName,
255 IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
256 OUT PVOID KeyValueInformation,
257 IN ULONG Length,
258 OUT PULONG ResultLength
259 );
260
261 NTSYSCALLAPI
262 NTSTATUS
263 NTAPI
264 NtRenameKey(
265 IN HANDLE KeyHandle,
266 IN PUNICODE_STRING ReplacementName
267 );
268
269 NTSYSCALLAPI
270 NTSTATUS
271 NTAPI
272 NtReplaceKey(
273 IN POBJECT_ATTRIBUTES ObjectAttributes,
274 IN HANDLE Key,
275 IN POBJECT_ATTRIBUTES ReplacedObjectAttributes
276 );
277
278 NTSYSCALLAPI
279 NTSTATUS
280 NTAPI
281 NtRestoreKey(
282 IN HANDLE KeyHandle,
283 IN HANDLE FileHandle,
284 IN ULONG RestoreFlags
285 );
286
287 NTSYSCALLAPI
288 NTSTATUS
289 NTAPI
290 NtSaveKey(
291 IN HANDLE KeyHandle,
292 IN HANDLE FileHandle
293 );
294
295 NTSYSCALLAPI
296 NTSTATUS
297 NTAPI
298 NtSaveKeyEx(
299 IN HANDLE KeyHandle,
300 IN HANDLE FileHandle,
301 IN ULONG Flags
302 );
303
304
305 NTSTATUS
306 NTAPI
307 NtSaveMergedKeys(
308 IN HANDLE HighPrecedenceKeyHandle,
309 IN HANDLE LowPrecedenceKeyHandle,
310 IN HANDLE FileHandle
311 );
312
313 NTSYSCALLAPI
314 NTSTATUS
315 NTAPI
316 NtSetInformationKey(
317 IN HANDLE KeyHandle,
318 IN KEY_SET_INFORMATION_CLASS KeyInformationClass,
319 IN PVOID KeyInformation,
320 IN ULONG KeyInformationLength
321 );
322
323 NTSYSCALLAPI
324 NTSTATUS
325 NTAPI
326 NtSetValueKey(
327 IN HANDLE KeyHandle,
328 IN PUNICODE_STRING ValueName,
329 IN ULONG TitleIndex OPTIONAL,
330 IN ULONG Type,
331 IN PVOID Data,
332 IN ULONG DataSize
333 );
334
335 NTSYSCALLAPI
336 NTSTATUS
337 NTAPI
338 NtUnloadKey(
339 IN POBJECT_ATTRIBUTES KeyObjectAttributes
340 );
341
342 NTSTATUS
343 NTAPI
344 NtUnloadKey2(
345 IN POBJECT_ATTRIBUTES TargetKey,
346 IN ULONG Flags
347 );
348
349 NTSTATUS
350 NTAPI
351 NtUnloadKeyEx(
352 IN POBJECT_ATTRIBUTES TargetKey,
353 IN HANDLE Event
354 );
355
356 #ifdef NTOS_MODE_USER
357 NTSYSAPI
358 NTSTATUS
359 NTAPI
360 ZwCreateKey(
361 OUT PHANDLE KeyHandle,
362 IN ACCESS_MASK DesiredAccess,
363 IN POBJECT_ATTRIBUTES ObjectAttributes,
364 IN ULONG TitleIndex,
365 IN PUNICODE_STRING Class OPTIONAL,
366 IN ULONG CreateOptions,
367 IN PULONG Disposition OPTIONAL
368 );
369
370 NTSYSAPI
371 NTSTATUS
372 NTAPI
373 ZwDeleteKey(
374 IN HANDLE KeyHandle
375 );
376
377 NTSYSAPI
378 NTSTATUS
379 NTAPI
380 ZwDeleteValueKey(
381 IN HANDLE KeyHandle,
382 IN PUNICODE_STRING ValueName
383 );
384
385 NTSYSAPI
386 NTSTATUS
387 NTAPI
388 ZwEnumerateKey(
389 IN HANDLE KeyHandle,
390 IN ULONG Index,
391 IN KEY_INFORMATION_CLASS KeyInformationClass,
392 OUT PVOID KeyInformation,
393 IN ULONG Length,
394 OUT PULONG ResultLength
395 );
396
397 NTSYSAPI
398 NTSTATUS
399 NTAPI
400 ZwEnumerateValueKey(
401 IN HANDLE KeyHandle,
402 IN ULONG Index,
403 IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
404 OUT PVOID KeyValueInformation,
405 IN ULONG Length,
406 OUT PULONG ResultLength
407 );
408
409 NTSYSAPI
410 NTSTATUS
411 NTAPI
412 ZwFlushKey(
413 IN HANDLE KeyHandle
414 );
415
416 NTSYSAPI
417 NTSTATUS
418 NTAPI
419 ZwGetPlugPlayEvent(
420 IN ULONG Reserved1,
421 IN ULONG Reserved2,
422 OUT PPLUGPLAY_EVENT_BLOCK Buffer,
423 IN ULONG BufferSize
424 );
425
426 NTSYSAPI
427 NTSTATUS
428 NTAPI
429 ZwLoadKey(
430 IN POBJECT_ATTRIBUTES KeyObjectAttributes,
431 IN POBJECT_ATTRIBUTES FileObjectAttributes
432 );
433
434 NTSYSAPI
435 NTSTATUS
436 NTAPI
437 ZwLoadKey2(
438 IN POBJECT_ATTRIBUTES KeyObjectAttributes,
439 IN POBJECT_ATTRIBUTES FileObjectAttributes,
440 IN ULONG Flags
441 );
442
443 NTSYSAPI
444 NTSTATUS
445 NTAPI
446 ZwNotifyChangeKey(
447 IN HANDLE KeyHandle,
448 IN HANDLE Event,
449 IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
450 IN PVOID ApcContext OPTIONAL,
451 OUT PIO_STATUS_BLOCK IoStatusBlock,
452 IN ULONG CompletionFilter,
453 IN BOOLEAN Asynchroneous,
454 OUT PVOID ChangeBuffer,
455 IN ULONG Length,
456 IN BOOLEAN WatchSubtree
457 );
458
459 NTSYSAPI
460 NTSTATUS
461 NTAPI
462 ZwOpenKey(
463 OUT PHANDLE KeyHandle,
464 IN ACCESS_MASK DesiredAccess,
465 IN POBJECT_ATTRIBUTES ObjectAttributes
466 );
467
468 NTSYSAPI
469 NTSTATUS
470 NTAPI
471 ZwPlugPlayControl(
472 IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
473 IN OUT PVOID Buffer,
474 IN ULONG BufferSize
475 );
476
477 NTSYSAPI
478 NTSTATUS
479 NTAPI
480 ZwQueryKey(
481 IN HANDLE KeyHandle,
482 IN KEY_INFORMATION_CLASS KeyInformationClass,
483 OUT PVOID KeyInformation,
484 IN ULONG Length,
485 OUT PULONG ResultLength
486 );
487
488 NTSYSAPI
489 NTSTATUS
490 NTAPI
491 ZwQueryMultipleValueKey(
492 IN HANDLE KeyHandle,
493 IN OUT PKEY_VALUE_ENTRY ValueList,
494 IN ULONG NumberOfValues,
495 OUT PVOID Buffer,
496 IN OUT PULONG Length,
497 OUT PULONG ReturnLength
498 );
499
500 NTSYSAPI
501 NTSTATUS
502 NTAPI
503 ZwQueryValueKey(
504 IN HANDLE KeyHandle,
505 IN PUNICODE_STRING ValueName,
506 IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
507 OUT PVOID KeyValueInformation,
508 IN ULONG Length,
509 OUT PULONG ResultLength
510 );
511
512 NTSYSAPI
513 NTSTATUS
514 NTAPI
515 ZwReplaceKey(
516 IN POBJECT_ATTRIBUTES ObjectAttributes,
517 IN HANDLE Key,
518 IN POBJECT_ATTRIBUTES ReplacedObjectAttributes
519 );
520
521 NTSYSAPI
522 NTSTATUS
523 NTAPI
524 ZwRestoreKey(
525 IN HANDLE KeyHandle,
526 IN HANDLE FileHandle,
527 IN ULONG RestoreFlags
528 );
529
530 NTSYSAPI
531 NTSTATUS
532 NTAPI
533 ZwSaveKey(
534 IN HANDLE KeyHandle,
535 IN HANDLE FileHandle
536 );
537
538 NTSYSAPI
539 NTSTATUS
540 NTAPI
541 ZwSaveKeyEx(
542 IN HANDLE KeyHandle,
543 IN HANDLE FileHandle,
544 IN ULONG Flags
545 );
546
547 NTSYSAPI
548 NTSTATUS
549 NTAPI
550 ZwSetInformationKey(
551 IN HANDLE KeyHandle,
552 IN KEY_SET_INFORMATION_CLASS KeyInformationClass,
553 IN PVOID KeyInformation,
554 IN ULONG KeyInformationLength
555 );
556
557 NTSYSAPI
558 NTSTATUS
559 NTAPI
560 ZwSetValueKey(
561 IN HANDLE KeyHandle,
562 IN PUNICODE_STRING ValueName,
563 IN ULONG TitleIndex OPTIONAL,
564 IN ULONG Type,
565 IN PVOID Data,
566 IN ULONG DataSize
567 );
568 #endif
569
570 NTSYSAPI
571 NTSTATUS
572 NTAPI
573 ZwInitializeRegistry(
574 USHORT Flag
575 );
576
577 NTSYSAPI
578 NTSTATUS
579 NTAPI
580 ZwUnloadKey(
581 IN POBJECT_ATTRIBUTES KeyObjectAttributes
582 );
583
584 #endif