ReactOS  0.4.15-dev-2355-gaf9df93
wdffdo.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  WdfFdo.h
10 
11 Abstract:
12 
13  This is the interface to the FDO functionality in the framework. This also
14  covers filters.
15 
16 Environment:
17 
18  kernel mode only
19 
20 Revision History:
21 
22 --*/
23 
24 //
25 // NOTE: This header is generated by stubwork. Please make any
26 // modifications to the corresponding template files
27 // (.x or .y) and use stubwork to regenerate the header
28 //
29 
30 #ifndef _WDFFDO_H_
31 #define _WDFFDO_H_
32 
33 #ifndef WDF_EXTERN_C
34  #ifdef __cplusplus
35  #define WDF_EXTERN_C extern "C"
36  #define WDF_EXTERN_C_START extern "C" {
37  #define WDF_EXTERN_C_END }
38  #else
39  #define WDF_EXTERN_C
40  #define WDF_EXTERN_C_START
41  #define WDF_EXTERN_C_END
42  #endif
43 #endif
44 
46 
47 
48 
49 #if (NTDDI_VERSION >= NTDDI_WIN2K)
50 
51 
52 
53 typedef
54 _Function_class_(EVT_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS)
58 STDCALL
59 EVT_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS(
60  _In_
61  WDFDEVICE Device,
62  _In_
63  WDFIORESREQLIST IoResourceRequirementsList
64  );
65 
66 typedef EVT_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS *PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS;
67 
68 typedef
69 _Function_class_(EVT_WDF_DEVICE_REMOVE_ADDED_RESOURCES)
73 STDCALL
74 EVT_WDF_DEVICE_REMOVE_ADDED_RESOURCES(
75  _In_
76  WDFDEVICE Device,
77  _In_
78  WDFCMRESLIST ResourcesRaw,
79  _In_
80  WDFCMRESLIST ResourcesTranslated
81  );
82 
83 typedef EVT_WDF_DEVICE_REMOVE_ADDED_RESOURCES *PFN_WDF_DEVICE_REMOVE_ADDED_RESOURCES;
84 
85 typedef struct _WDF_FDO_EVENT_CALLBACKS {
86  //
87  // Size of this structure in bytes
88  //
90 
92 
94 
96 
98 
100 VOID
103  )
104 {
106  Callbacks->Size = sizeof(WDF_FDO_EVENT_CALLBACKS);
107 }
108 
109 
110 //
111 // WDF Function: WdfFdoInitWdmGetPhysicalDevice
112 //
113 typedef
115 WDFAPI
117 (STDCALL *PFN_WDFFDOINITWDMGETPHYSICALDEVICE)(
118  _In_
120  _In_
122  );
123 
127 WdfFdoInitWdmGetPhysicalDevice(
128  _In_
130  )
131 {
132  return ((PFN_WDFFDOINITWDMGETPHYSICALDEVICE) WdfFunctions[WdfFdoInitWdmGetPhysicalDeviceTableIndex])(WdfDriverGlobals, DeviceInit);
133 }
134 
135 //
136 // WDF Function: WdfFdoInitOpenRegistryKey
137 //
138 typedef
141 WDFAPI
142 NTSTATUS
143 (STDCALL *PFN_WDFFDOINITOPENREGISTRYKEY)(
144  _In_
146  _In_
148  _In_
150  _In_
152  _In_opt_
154  _Out_
155  WDFKEY* Key
156  );
157 
161 NTSTATUS
162 WdfFdoInitOpenRegistryKey(
163  _In_
165  _In_
167  _In_
169  _In_opt_
171  _Out_
172  WDFKEY* Key
173  )
174 {
176 }
177 
178 //
179 // WDF Function: WdfFdoInitQueryProperty
180 //
181 typedef
184 WDFAPI
185 NTSTATUS
186 (STDCALL *PFN_WDFFDOINITQUERYPROPERTY)(
187  _In_
189  _In_
191  _In_
193  _In_
197  _Out_
199  );
200 
204 NTSTATUS
205 WdfFdoInitQueryProperty(
206  _In_
208  _In_
210  _In_
214  _Out_
216  )
217 {
219 }
220 
221 //
222 // WDF Function: WdfFdoInitAllocAndQueryProperty
223 //
224 typedef
227 WDFAPI
228 NTSTATUS
229 (STDCALL *PFN_WDFFDOINITALLOCANDQUERYPROPERTY)(
230  _In_
232  _In_
234  _In_
236  _In_
239  _In_opt_
241  _Out_
242  WDFMEMORY* PropertyMemory
243  );
244 
248 NTSTATUS
249 WdfFdoInitAllocAndQueryProperty(
250  _In_
252  _In_
254  _In_
257  _In_opt_
259  _Out_
260  WDFMEMORY* PropertyMemory
261  )
262 {
264 }
265 
266 //
267 // WDF Function: WdfFdoInitQueryPropertyEx
268 //
269 typedef
272 WDFAPI
273 NTSTATUS
274 (STDCALL *PFN_WDFFDOINITQUERYPROPERTYEX)(
275  _In_
277  _In_
279  _In_
281  _In_
283  _Out_
285  _Out_
287  _Out_
289  );
290 
294 NTSTATUS
295 WdfFdoInitQueryPropertyEx(
296  _In_
298  _In_
300  _In_
302  _Out_
304  _Out_
306  _Out_
308  )
309 {
311 }
312 
313 //
314 // WDF Function: WdfFdoInitAllocAndQueryPropertyEx
315 //
316 typedef
319 WDFAPI
320 NTSTATUS
321 (STDCALL *PFN_WDFFDOINITALLOCANDQUERYPROPERTYEX)(
322  _In_
324  _In_
326  _In_
328  _In_
331  _In_opt_
333  _Out_
334  WDFMEMORY* PropertyMemory,
335  _Out_
337  );
338 
342 NTSTATUS
343 WdfFdoInitAllocAndQueryPropertyEx(
344  _In_
346  _In_
348  _In_
351  _In_opt_
353  _Out_
354  WDFMEMORY* PropertyMemory,
355  _Out_
357  )
358 {
360 }
361 
362 //
363 // WDF Function: WdfFdoInitSetEventCallbacks
364 //
365 typedef
367 WDFAPI
368 VOID
369 (STDCALL *PFN_WDFFDOINITSETEVENTCALLBACKS)(
370  _In_
372  _In_
374  _In_
376  );
377 
380 VOID
381 WdfFdoInitSetEventCallbacks(
382  _In_
384  _In_
386  )
387 {
389 }
390 
391 //
392 // WDF Function: WdfFdoInitSetFilter
393 //
394 typedef
396 WDFAPI
397 VOID
398 (STDCALL *PFN_WDFFDOINITSETFILTER)(
399  _In_
401  _In_
403  );
404 
407 VOID
408 WdfFdoInitSetFilter(
409  _In_
411  )
412 {
414 }
415 
416 //
417 // WDF Function: WdfFdoInitSetDefaultChildListConfig
418 //
419 typedef
421 WDFAPI
422 VOID
423 (STDCALL *PFN_WDFFDOINITSETDEFAULTCHILDLISTCONFIG)(
424  _In_
426  _Inout_
428  _In_
430  _In_opt_
432  );
433 
436 VOID
437 WdfFdoInitSetDefaultChildListConfig(
438  _Inout_
440  _In_
442  _In_opt_
444  )
445 {
447 }
448 
449 //
450 // WDF Function: WdfFdoQueryForInterface
451 //
452 typedef
455 WDFAPI
456 NTSTATUS
457 (STDCALL *PFN_WDFFDOQUERYFORINTERFACE)(
458  _In_
460  _In_
461  WDFDEVICE Fdo,
462  _In_
464  _Out_
466  _In_
467  USHORT Size,
468  _In_
469  USHORT Version,
470  _In_opt_
472  );
473 
477 NTSTATUS
478 WdfFdoQueryForInterface(
479  _In_
480  WDFDEVICE Fdo,
481  _In_
483  _Out_
485  _In_
486  USHORT Size,
487  _In_
488  USHORT Version,
489  _In_opt_
491  )
492 {
494 }
495 
496 //
497 // WDF Function: WdfFdoGetDefaultChildList
498 //
499 typedef
501 WDFAPI
502 WDFCHILDLIST
503 (STDCALL *PFN_WDFFDOGETDEFAULTCHILDLIST)(
504  _In_
506  _In_
507  WDFDEVICE Fdo
508  );
509 
512 WDFCHILDLIST
513 WdfFdoGetDefaultChildList(
514  _In_
515  WDFDEVICE Fdo
516  )
517 {
518  return ((PFN_WDFFDOGETDEFAULTCHILDLIST) WdfFunctions[WdfFdoGetDefaultChildListTableIndex])(WdfDriverGlobals, Fdo);
519 }
520 
521 //
522 // WDF Function: WdfFdoAddStaticChild
523 //
524 typedef
527 WDFAPI
528 NTSTATUS
529 (STDCALL *PFN_WDFFDOADDSTATICCHILD)(
530  _In_
532  _In_
533  WDFDEVICE Fdo,
534  _In_
535  WDFDEVICE Child
536  );
537 
541 NTSTATUS
542 WdfFdoAddStaticChild(
543  _In_
544  WDFDEVICE Fdo,
545  _In_
546  WDFDEVICE Child
547  )
548 {
549  return ((PFN_WDFFDOADDSTATICCHILD) WdfFunctions[WdfFdoAddStaticChildTableIndex])(WdfDriverGlobals, Fdo, Child);
550 }
551 
552 //
553 // WDF Function: WdfFdoLockStaticChildListForIteration
554 //
555 typedef
557 WDFAPI
558 VOID
559 (STDCALL *PFN_WDFFDOLOCKSTATICCHILDLISTFORITERATION)(
560  _In_
562  _In_
563  WDFDEVICE Fdo
564  );
565 
568 VOID
569 WdfFdoLockStaticChildListForIteration(
570  _In_
571  WDFDEVICE Fdo
572  )
573 {
574  ((PFN_WDFFDOLOCKSTATICCHILDLISTFORITERATION) WdfFunctions[WdfFdoLockStaticChildListForIterationTableIndex])(WdfDriverGlobals, Fdo);
575 }
576 
577 //
578 // WDF Function: WdfFdoRetrieveNextStaticChild
579 //
580 typedef
583 WDFAPI
584 WDFDEVICE
585 (STDCALL *PFN_WDFFDORETRIEVENEXTSTATICCHILD)(
586  _In_
588  _In_
589  WDFDEVICE Fdo,
590  _In_opt_
591  WDFDEVICE PreviousChild,
592  _In_
593  ULONG Flags
594  );
595 
599 WDFDEVICE
600 WdfFdoRetrieveNextStaticChild(
601  _In_
602  WDFDEVICE Fdo,
603  _In_opt_
604  WDFDEVICE PreviousChild,
605  _In_
606  ULONG Flags
607  )
608 {
609  return ((PFN_WDFFDORETRIEVENEXTSTATICCHILD) WdfFunctions[WdfFdoRetrieveNextStaticChildTableIndex])(WdfDriverGlobals, Fdo, PreviousChild, Flags);
610 }
611 
612 //
613 // WDF Function: WdfFdoUnlockStaticChildListFromIteration
614 //
615 typedef
617 WDFAPI
618 VOID
619 (STDCALL *PFN_WDFFDOUNLOCKSTATICCHILDLISTFROMITERATION)(
620  _In_
622  _In_
623  WDFDEVICE Fdo
624  );
625 
628 VOID
629 WdfFdoUnlockStaticChildListFromIteration(
630  _In_
631  WDFDEVICE Fdo
632  )
633 {
634  ((PFN_WDFFDOUNLOCKSTATICCHILDLISTFROMITERATION) WdfFunctions[WdfFdoUnlockStaticChildListFromIterationTableIndex])(WdfDriverGlobals, Fdo);
635 }
636 
637 
638 
639 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
640 
641 
643 
644 #endif // _WDFFDO_H_
645 
DEVICE_REGISTRY_PROPERTY
Definition: iotypes.h:1194
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ WDFDEVICE _In_ ULONG Flags
Definition: wdffdo.h:589
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3767
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT _In_opt_ PVOID InterfaceSpecificData
Definition: wdffdo.h:461
PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS EvtDeviceFilterAddResourceRequirements
Definition: wdffdo.h:91
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2654
#define _Must_inspect_result_
Definition: no_sal2.h:62
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_writes_bytes_all_opt_(BufferLength) PVOID PropertyBuffer
Definition: wdffdo.h:195
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID PropertyBuffer
Definition: wdffdo.h:278
_Inout_ PWDFDEVICE_INIT _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdffdo.h:427
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdffdo.h:190
struct _DEVICE_OBJECT * PDEVICE_OBJECT
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
Definition: wdfdevice.h:3767
LONG NTSTATUS
Definition: precomp.h:26
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFMEMORY * PropertyMemory
Definition: wdfdevice.h:3810
DriverGlobals
_In_ WDFIORESREQLIST IoResourceRequirementsList
Definition: wdfpdo.h:78
ULONG * PDEVPROPTYPE
Definition: devpropdef.h:24
_Inout_ PWDFDEVICE_INIT _In_ PWDF_CHILD_LIST_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES DefaultChildListAttributes
Definition: wdffdo.h:427
#define _In_opt_
Definition: no_sal2.h:212
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT Size
Definition: wdffdo.h:461
#define WdfFunctions
Definition: wdf.h:66
_In_ WDFCMRESLIST ResourcesRaw
Definition: wdfdevice.h:888
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFDEVICE Child
Definition: wdffdo.h:533
#define WDFAPI
Definition: wdftypes.h:53
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ WDFDEVICE PreviousChild
Definition: wdffdo.h:589
#define _Out_
Definition: no_sal2.h:160
#define _IRQL_requires_same_
Definition: driverspecs.h:215
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:461
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES KeyAttributes
Definition: wdfdevice.h:2654
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdffdo.h:147
struct _WDF_FDO_EVENT_CALLBACKS * PWDF_FDO_EVENT_CALLBACKS
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdffdo.h:122
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define STDCALL
Definition: wdf.h:45
const struct winhelp_callbacks Callbacks
Definition: callback.c:161
INT POOL_TYPE
Definition: typedefs.h:78
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdffdo.h:233
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ ULONG _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES KeyAttributes
Definition: wdffdo.h:147
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG DeviceInstanceKeyType
Definition: wdfdevice.h:2654
Type
Definition: Type.h:6
EVT_WDF_DEVICE_REMOVE_ADDED_RESOURCES * PFN_WDF_DEVICE_REMOVE_ADDED_RESOURCES
Definition: wdffdo.h:83
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:361
#define _Inout_
Definition: no_sal2.h:162
#define WDF_EXTERN_C_START
Definition: wdffdo.h:40
#define _Strict_type_match_
Definition: no_sal2.h:406
_Must_inspect_result_ _In_ WDFDEVICE Fdo
Definition: wdffdo.h:461
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes
Definition: wdffdo.h:233
#define WDF_EXTERN_C_END
Definition: wdffdo.h:41
WDF_EXTERN_C_START typedef _Function_class_(EVT_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS(_In_ WDFDEVICE Device
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
Definition: wdffdo.h:190
#define NTSTATUS
Definition: precomp.h:20
#define VOID
Definition: acefi.h:82
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG _Out_ PDEVPROPTYPE Type
Definition: wdffdo.h:278
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID PropertyBuffer
Definition: wdfdevice.h:4431
FORCEINLINE VOID WDF_FDO_EVENT_CALLBACKS_INIT(_Out_ PWDF_FDO_EVENT_CALLBACKS Callbacks)
Definition: wdffdo.h:101
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDFCMRESLIST _In_ WDFCMRESLIST ResourcesTranslated
Definition: wdfdevice.h:888
_Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFFDOINITOPENREGISTRYKEY)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
Definition: wdffdo.h:140
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ ULONG DeviceInstanceKeyType
Definition: wdffdo.h:147
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes
Definition: wdfdevice.h:3810
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:474
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define _In_
Definition: no_sal2.h:158
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdffdo.h:199
unsigned short USHORT
Definition: pedump.c:61
PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS EvtDeviceFilterRemoveResourceRequirements
Definition: wdffdo.h:93
_In_ PWDFDEVICE_INIT _In_ PWDF_FDO_EVENT_CALLBACKS FdoEventCallbacks
Definition: wdffdo.h:373
#define FORCEINLINE
Definition: wdftypes.h:67
unsigned int * PULONG
Definition: retypes.h:1
PFN_WDF_DEVICE_REMOVE_ADDED_RESOURCES EvtDeviceRemoveAddedResources
Definition: wdffdo.h:95
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFMEMORY * PropertyMemory
Definition: wdffdo.h:233
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:461
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
struct _WDF_FDO_EVENT_CALLBACKS WDF_FDO_EVENT_CALLBACKS
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ ULONG _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFKEY * Key
Definition: wdffdo.h:147
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
ULONG ACCESS_MASK
Definition: nt_native.h:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:461
EVT_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS * PFN_WDF_DEVICE_FILTER_RESOURCE_REQUIREMENTS
Definition: wdffdo.h:66