ReactOS  0.4.15-dev-3294-ge98684e
wdfregistry.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 
5 _WdfVersionBuild_
6 
7 Module Name:
8 
9  WdfRegistry.h
10 
11 Abstract:
12 
13  This is the interface to registry access.
14 
15 Environment:
16 
17  kernel mode only
18 
19 Revision History:
20 
21 --*/
22 
23 //
24 // NOTE: This header is generated by stubwork. Please make any
25 // modifications to the corresponding template files
26 // (.x or .y) and use stubwork to regenerate the header
27 //
28 
29 #ifndef _WDFREGISTRY_H_
30 #define _WDFREGISTRY_H_
31 
32 #ifndef WDF_EXTERN_C
33  #ifdef __cplusplus
34  #define WDF_EXTERN_C extern "C"
35  #define WDF_EXTERN_C_START extern "C" {
36  #define WDF_EXTERN_C_END }
37  #else
38  #define WDF_EXTERN_C
39  #define WDF_EXTERN_C_START
40  #define WDF_EXTERN_C_END
41  #endif
42 #endif
43 
45 
46 
47 
48 #if (NTDDI_VERSION >= NTDDI_WIN2K)
49 
50 #define WDF_REGKEY_DEVICE_SUBKEY 0
51 #define WDF_REGKEY_DRIVER_SUBKEY 0
52 
53 
54 
55 
56 
57 //
58 // WDF Function: WdfRegistryOpenKey
59 //
60 typedef
63 WDFAPI
65 (STDCALL *PFN_WDFREGISTRYOPENKEY)(
66  _In_
68  _In_opt_
69  WDFKEY ParentKey,
70  _In_
72  _In_
74  _In_opt_
76  _Out_
77  WDFKEY* Key
78  );
79 
84 WdfRegistryOpenKey(
85  _In_opt_
86  WDFKEY ParentKey,
87  _In_
89  _In_
91  _In_opt_
93  _Out_
94  WDFKEY* Key
95  )
96 {
98 }
99 
100 //
101 // WDF Function: WdfRegistryCreateKey
102 //
103 typedef
106 WDFAPI
107 NTSTATUS
108 (STDCALL *PFN_WDFREGISTRYCREATEKEY)(
109  _In_
111  _In_opt_
112  WDFKEY ParentKey,
113  _In_
115  _In_
117  _In_
119  _Out_opt_
121  _In_opt_
123  _Out_
124  WDFKEY* Key
125  );
126 
130 NTSTATUS
131 WdfRegistryCreateKey(
132  _In_opt_
133  WDFKEY ParentKey,
134  _In_
136  _In_
138  _In_
140  _Out_opt_
142  _In_opt_
144  _Out_
145  WDFKEY* Key
146  )
147 {
149 }
150 
151 //
152 // WDF Function: WdfRegistryClose
153 //
154 typedef
156 WDFAPI
157 VOID
158 (STDCALL *PFN_WDFREGISTRYCLOSE)(
159  _In_
161  _In_
162  WDFKEY Key
163  );
164 
167 VOID
168 WdfRegistryClose(
169  _In_
170  WDFKEY Key
171  )
172 {
173  ((PFN_WDFREGISTRYCLOSE) WdfFunctions[WdfRegistryCloseTableIndex])(WdfDriverGlobals, Key);
174 }
175 
176 //
177 // WDF Function: WdfRegistryWdmGetHandle
178 //
179 typedef
181 WDFAPI
182 HANDLE
183 (STDCALL *PFN_WDFREGISTRYWDMGETHANDLE)(
184  _In_
186  _In_
187  WDFKEY Key
188  );
189 
192 HANDLE
193 WdfRegistryWdmGetHandle(
194  _In_
195  WDFKEY Key
196  )
197 {
198  return ((PFN_WDFREGISTRYWDMGETHANDLE) WdfFunctions[WdfRegistryWdmGetHandleTableIndex])(WdfDriverGlobals, Key);
199 }
200 
201 //
202 // WDF Function: WdfRegistryRemoveKey
203 //
204 typedef
207 WDFAPI
208 NTSTATUS
209 (STDCALL *PFN_WDFREGISTRYREMOVEKEY)(
210  _In_
212  _In_
213  WDFKEY Key
214  );
215 
219 NTSTATUS
220 WdfRegistryRemoveKey(
221  _In_
222  WDFKEY Key
223  )
224 {
225  return ((PFN_WDFREGISTRYREMOVEKEY) WdfFunctions[WdfRegistryRemoveKeyTableIndex])(WdfDriverGlobals, Key);
226 }
227 
228 //
229 // WDF Function: WdfRegistryRemoveValue
230 //
231 typedef
234 WDFAPI
235 NTSTATUS
236 (STDCALL *PFN_WDFREGISTRYREMOVEVALUE)(
237  _In_
239  _In_
240  WDFKEY Key,
241  _In_
243  );
244 
248 NTSTATUS
249 WdfRegistryRemoveValue(
250  _In_
251  WDFKEY Key,
252  _In_
254  )
255 {
256  return ((PFN_WDFREGISTRYREMOVEVALUE) WdfFunctions[WdfRegistryRemoveValueTableIndex])(WdfDriverGlobals, Key, ValueName);
257 }
258 
259 //
260 // WDF Function: WdfRegistryQueryValue
261 //
262 typedef
265 WDFAPI
266 NTSTATUS
267 (STDCALL *PFN_WDFREGISTRYQUERYVALUE)(
268  _In_
270  _In_
271  WDFKEY Key,
272  _In_
274  _In_
277  PVOID Value,
278  _Out_opt_
280  _Out_opt_
282  );
283 
287 NTSTATUS
288 WdfRegistryQueryValue(
289  _In_
290  WDFKEY Key,
291  _In_
293  _In_
296  PVOID Value,
297  _Out_opt_
299  _Out_opt_
301  )
302 {
304 }
305 
306 //
307 // WDF Function: WdfRegistryQueryMemory
308 //
309 typedef
312 WDFAPI
313 NTSTATUS
314 (STDCALL *PFN_WDFREGISTRYQUERYMEMORY)(
315  _In_
317  _In_
318  WDFKEY Key,
319  _In_
321  _In_
324  _In_opt_
326  _Out_
327  WDFMEMORY* Memory,
328  _Out_opt_
330  );
331 
335 NTSTATUS
336 WdfRegistryQueryMemory(
337  _In_
338  WDFKEY Key,
339  _In_
341  _In_
344  _In_opt_
346  _Out_
347  WDFMEMORY* Memory,
348  _Out_opt_
350  )
351 {
353 }
354 
355 //
356 // WDF Function: WdfRegistryQueryMultiString
357 //
358 typedef
361 WDFAPI
362 NTSTATUS
363 (STDCALL *PFN_WDFREGISTRYQUERYMULTISTRING)(
364  _In_
366  _In_
367  WDFKEY Key,
368  _In_
370  _In_opt_
372  _In_
373  WDFCOLLECTION Collection
374  );
375 
379 NTSTATUS
380 WdfRegistryQueryMultiString(
381  _In_
382  WDFKEY Key,
383  _In_
385  _In_opt_
387  _In_
388  WDFCOLLECTION Collection
389  )
390 {
392 }
393 
394 //
395 // WDF Function: WdfRegistryQueryUnicodeString
396 //
397 typedef
400 WDFAPI
401 NTSTATUS
402 (STDCALL *PFN_WDFREGISTRYQUERYUNICODESTRING)(
403  _In_
405  _In_
406  WDFKEY Key,
407  _In_
409  _Out_opt_
413  );
414 
418 NTSTATUS
419 WdfRegistryQueryUnicodeString(
420  _In_
421  WDFKEY Key,
422  _In_
424  _Out_opt_
428  )
429 {
431 }
432 
433 //
434 // WDF Function: WdfRegistryQueryString
435 //
436 typedef
439 WDFAPI
440 NTSTATUS
441 (STDCALL *PFN_WDFREGISTRYQUERYSTRING)(
442  _In_
444  _In_
445  WDFKEY Key,
446  _In_
448  _In_
449  WDFSTRING String
450  );
451 
455 NTSTATUS
456 WdfRegistryQueryString(
457  _In_
458  WDFKEY Key,
459  _In_
461  _In_
462  WDFSTRING String
463  )
464 {
465  return ((PFN_WDFREGISTRYQUERYSTRING) WdfFunctions[WdfRegistryQueryStringTableIndex])(WdfDriverGlobals, Key, ValueName, String);
466 }
467 
468 //
469 // WDF Function: WdfRegistryQueryULong
470 //
471 typedef
474 WDFAPI
475 NTSTATUS
476 (STDCALL *PFN_WDFREGISTRYQUERYULONG)(
477  _In_
479  _In_
480  WDFKEY Key,
481  _In_
483  _Out_
484  PULONG Value
485  );
486 
490 NTSTATUS
491 WdfRegistryQueryULong(
492  _In_
493  WDFKEY Key,
494  _In_
496  _Out_
497  PULONG Value
498  )
499 {
500  return ((PFN_WDFREGISTRYQUERYULONG) WdfFunctions[WdfRegistryQueryULongTableIndex])(WdfDriverGlobals, Key, ValueName, Value);
501 }
502 
503 //
504 // WDF Function: WdfRegistryAssignValue
505 //
506 typedef
509 WDFAPI
510 NTSTATUS
511 (STDCALL *PFN_WDFREGISTRYASSIGNVALUE)(
512  _In_
514  _In_
515  WDFKEY Key,
516  _In_
518  _In_
520  _In_
523  PVOID Value
524  );
525 
529 NTSTATUS
530 WdfRegistryAssignValue(
531  _In_
532  WDFKEY Key,
533  _In_
535  _In_
537  _In_
540  PVOID Value
541  )
542 {
544 }
545 
546 //
547 // WDF Function: WdfRegistryAssignMemory
548 //
549 typedef
552 WDFAPI
553 NTSTATUS
554 (STDCALL *PFN_WDFREGISTRYASSIGNMEMORY)(
555  _In_
557  _In_
558  WDFKEY Key,
559  _In_
561  _In_
563  _In_
564  WDFMEMORY Memory,
565  _In_opt_
567  );
568 
572 NTSTATUS
573 WdfRegistryAssignMemory(
574  _In_
575  WDFKEY Key,
576  _In_
578  _In_
580  _In_
581  WDFMEMORY Memory,
582  _In_opt_
584  )
585 {
587 }
588 
589 //
590 // WDF Function: WdfRegistryAssignMultiString
591 //
592 typedef
595 WDFAPI
596 NTSTATUS
597 (STDCALL *PFN_WDFREGISTRYASSIGNMULTISTRING)(
598  _In_
600  _In_
601  WDFKEY Key,
602  _In_
604  _In_
605  WDFCOLLECTION StringsCollection
606  );
607 
611 NTSTATUS
612 WdfRegistryAssignMultiString(
613  _In_
614  WDFKEY Key,
615  _In_
617  _In_
618  WDFCOLLECTION StringsCollection
619  )
620 {
622 }
623 
624 //
625 // WDF Function: WdfRegistryAssignUnicodeString
626 //
627 typedef
630 WDFAPI
631 NTSTATUS
632 (STDCALL *PFN_WDFREGISTRYASSIGNUNICODESTRING)(
633  _In_
635  _In_
636  WDFKEY Key,
637  _In_
639  _In_
641  );
642 
646 NTSTATUS
647 WdfRegistryAssignUnicodeString(
648  _In_
649  WDFKEY Key,
650  _In_
652  _In_
654  )
655 {
656  return ((PFN_WDFREGISTRYASSIGNUNICODESTRING) WdfFunctions[WdfRegistryAssignUnicodeStringTableIndex])(WdfDriverGlobals, Key, ValueName, Value);
657 }
658 
659 //
660 // WDF Function: WdfRegistryAssignString
661 //
662 typedef
665 WDFAPI
666 NTSTATUS
667 (STDCALL *PFN_WDFREGISTRYASSIGNSTRING)(
668  _In_
670  _In_
671  WDFKEY Key,
672  _In_
674  _In_
675  WDFSTRING String
676  );
677 
681 NTSTATUS
682 WdfRegistryAssignString(
683  _In_
684  WDFKEY Key,
685  _In_
687  _In_
688  WDFSTRING String
689  )
690 {
691  return ((PFN_WDFREGISTRYASSIGNSTRING) WdfFunctions[WdfRegistryAssignStringTableIndex])(WdfDriverGlobals, Key, ValueName, String);
692 }
693 
694 //
695 // WDF Function: WdfRegistryAssignULong
696 //
697 typedef
700 WDFAPI
701 NTSTATUS
702 (STDCALL *PFN_WDFREGISTRYASSIGNULONG)(
703  _In_
705  _In_
706  WDFKEY Key,
707  _In_
709  _In_
710  ULONG Value
711  );
712 
716 NTSTATUS
717 WdfRegistryAssignULong(
718  _In_
719  WDFKEY Key,
720  _In_
722  _In_
723  ULONG Value
724  )
725 {
726  return ((PFN_WDFREGISTRYASSIGNULONG) WdfFunctions[WdfRegistryAssignULongTableIndex])(WdfDriverGlobals, Key, ValueName, Value);
727 }
728 
729 
730 
731 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
732 
733 
735 
736 #endif // _WDFREGISTRY_H_
737 
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2654
#define _In_opt_
Definition: ms_sal.h:309
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES StringsAttributes
Definition: wdfregistry.h:367
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_writes_bytes_opt_(ValueLength) PVOID Value
Definition: wdfregistry.h:276
#define _Out_
Definition: ms_sal.h:345
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ WDFSTRING String
Definition: wdfregistry.h:445
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ WDFCOLLECTION Collection
Definition: wdfregistry.h:367
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfregistry.h:318
DriverGlobals
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES KeyAttributes
Definition: wdfregistry.h:69
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
Definition: wdfregistry.h:279
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT ValueByteLength
Definition: wdfregistry.h:406
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES MemoryAttributes
Definition: wdfregistry.h:318
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
#define WDFAPI
Definition: wdftypes.h:53
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK DesiredAccess
Definition: wdfregistry.h:69
#define _In_
Definition: ms_sal.h:308
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _In_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET MemoryOffsets
Definition: wdfregistry.h:558
#define WDF_EXTERN_C_END
Definition: wdfregistry.h:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2697
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _In_ ULONG _In_reads_(ValueLength) PVOID Value)
Definition: wdfregistry.h:522
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES KeyAttributes
Definition: wdfdevice.h:2654
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
Definition: wdfmemory.h:169
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG _Out_opt_ PULONG CreateDisposition
Definition: wdfregistry.h:112
#define STDCALL
Definition: wdf.h:45
INT POOL_TYPE
Definition: typedefs.h:78
PVOID HANDLE
Definition: typedefs.h:73
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES MemoryAttributes
Definition: wdfmemory.h:407
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:240
#define _Strict_type_match_
Definition: ms_sal.h:2954
_Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFREGISTRYOPENKEY)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
Definition: wdfregistry.h:62
#define NTSTATUS
Definition: precomp.h:20
#define VOID
Definition: acefi.h:82
#define _Inout_opt_
Definition: ms_sal.h:379
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define _Must_inspect_result_
Definition: ms_sal.h:558
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG CreateOptions
Definition: wdfregistry.h:112
#define WDF_EXTERN_C_START
Definition: wdfregistry.h:39
_Must_inspect_result_ _In_opt_ WDFKEY ParentKey
Definition: wdfregistry.h:69
#define FORCEINLINE
Definition: wdftypes.h:67
#define _Out_opt_
Definition: ms_sal.h:346
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ WDFCOLLECTION StringsCollection
Definition: wdfregistry.h:601
unsigned int * PULONG
Definition: retypes.h:1
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFMEMORY * Memory
Definition: wdfregistry.h:318
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG ValueLengthQueried
Definition: wdfregistry.h:279
unsigned int ULONG
Definition: retypes.h:1
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING KeyName
Definition: wdfregistry.h:69
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFKEY * Key
Definition: wdfregistry.h:69
unsigned short * PUSHORT
Definition: retypes.h:2
ULONG ACCESS_MASK
Definition: nt_native.h:40
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
Definition: wdfregistry.h:271