xref: /reactos/sdk/include/wdf/kmdf/1.17/wdfpdo.h (revision 1734f297)
1 /*++
2 
3 Copyright (c) Microsoft Corporation.  All rights reserved.
4 
5 _WdfVersionBuild_
6 
7 Module Name:
8 
9     WdfPdo.h
10 
11 Abstract:
12 
13     This is the interface to the PDO WDFDEVICE handle.
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 _WDFPDO_H_
30 #define _WDFPDO_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 
44 WDF_EXTERN_C_START
45 
46 
47 
48 #if (NTDDI_VERSION >= NTDDI_WIN2K)
49 
50 
51 
52 typedef
53 _Function_class_(EVT_WDF_DEVICE_RESOURCES_QUERY)
54 _IRQL_requires_same_
55 _IRQL_requires_max_(PASSIVE_LEVEL)
56 NTSTATUS
57 STDCALL
58 EVT_WDF_DEVICE_RESOURCES_QUERY(
59     _In_
60     WDFDEVICE Device,
61     _In_
62     WDFCMRESLIST Resources
63     );
64 
65 typedef EVT_WDF_DEVICE_RESOURCES_QUERY *PFN_WDF_DEVICE_RESOURCES_QUERY;
66 
67 typedef
68 _Function_class_(EVT_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY)
69 _IRQL_requires_same_
70 _IRQL_requires_max_(PASSIVE_LEVEL)
71 NTSTATUS
72 STDCALL
73 EVT_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY(
74     _In_
75     WDFDEVICE Device,
76     _In_
77     WDFIORESREQLIST IoResourceRequirementsList
78     );
79 
80 typedef EVT_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY *PFN_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY;
81 
82 typedef
83 _Function_class_(EVT_WDF_DEVICE_EJECT)
84 _IRQL_requires_same_
85 _IRQL_requires_max_(PASSIVE_LEVEL)
86 NTSTATUS
87 STDCALL
88 EVT_WDF_DEVICE_EJECT(
89     _In_
90     WDFDEVICE Device
91     );
92 
93 typedef EVT_WDF_DEVICE_EJECT *PFN_WDF_DEVICE_EJECT;
94 
95 typedef
96 _Function_class_(EVT_WDF_DEVICE_SET_LOCK)
97 _IRQL_requires_same_
98 _IRQL_requires_max_(PASSIVE_LEVEL)
99 NTSTATUS
100 STDCALL
101 EVT_WDF_DEVICE_SET_LOCK(
102     _In_
103     WDFDEVICE Device,
104     _In_
105     BOOLEAN IsLocked
106     );
107 
108 typedef EVT_WDF_DEVICE_SET_LOCK *PFN_WDF_DEVICE_SET_LOCK;
109 
110 typedef
111 _Function_class_(EVT_WDF_DEVICE_ENABLE_WAKE_AT_BUS)
112 _IRQL_requires_same_
113 _IRQL_requires_max_(PASSIVE_LEVEL)
114 NTSTATUS
115 STDCALL
116 EVT_WDF_DEVICE_ENABLE_WAKE_AT_BUS(
117     _In_
118     WDFDEVICE Device,
119     _In_
120     SYSTEM_POWER_STATE PowerState
121     );
122 
123 typedef EVT_WDF_DEVICE_ENABLE_WAKE_AT_BUS *PFN_WDF_DEVICE_ENABLE_WAKE_AT_BUS;
124 
125 typedef
126 _Function_class_(EVT_WDF_DEVICE_DISABLE_WAKE_AT_BUS)
127 _IRQL_requires_same_
128 _IRQL_requires_max_(PASSIVE_LEVEL)
129 VOID
130 STDCALL
131 EVT_WDF_DEVICE_DISABLE_WAKE_AT_BUS(
132     _In_
133     WDFDEVICE Device
134     );
135 
136 typedef EVT_WDF_DEVICE_DISABLE_WAKE_AT_BUS *PFN_WDF_DEVICE_DISABLE_WAKE_AT_BUS;
137 
138 typedef
139 _Function_class_(EVT_WDF_DEVICE_REPORTED_MISSING)
140 _IRQL_requires_same_
141 _IRQL_requires_max_(PASSIVE_LEVEL)
142 VOID
143 STDCALL
144 EVT_WDF_DEVICE_REPORTED_MISSING(
145     _In_
146     WDFDEVICE Device
147     );
148 
149 typedef EVT_WDF_DEVICE_REPORTED_MISSING *PFN_WDF_DEVICE_REPORTED_MISSING;
150 
151 typedef struct _WDF_PDO_EVENT_CALLBACKS {
152     //
153     // The size of this structure in bytes
154     //
155     ULONG Size;
156 
157     //
158     // Called in response to IRP_MN_QUERY_RESOURCES
159     //
160     PFN_WDF_DEVICE_RESOURCES_QUERY EvtDeviceResourcesQuery;
161 
162     //
163     // Called in response to IRP_MN_QUERY_RESOURCE_REQUIREMENTS
164     //
165     PFN_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY EvtDeviceResourceRequirementsQuery;
166 
167     //
168     // Called in response to IRP_MN_EJECT
169     //
170     PFN_WDF_DEVICE_EJECT EvtDeviceEject;
171 
172     //
173     // Called in response to IRP_MN_SET_LOCK
174     //
175     PFN_WDF_DEVICE_SET_LOCK EvtDeviceSetLock;
176 
177     //
178     // Called in response to the power policy owner sending a wait wake to the
179     // PDO.  Bus generic arming shoulding occur here.
180     //
181     PFN_WDF_DEVICE_ENABLE_WAKE_AT_BUS       EvtDeviceEnableWakeAtBus;
182 
183     //
184     // Called in response to the power policy owner sending a wait wake to the
185     // PDO.  Bus generic disarming shoulding occur here.
186     //
187     PFN_WDF_DEVICE_DISABLE_WAKE_AT_BUS      EvtDeviceDisableWakeAtBus;
188 
189     //
190     // Called when reporting the PDO missing to PnP manager in response to
191     // IRP_MN_QUERY_DEVICE_RELATIONS for Bus Relations.
192     //
193     PFN_WDF_DEVICE_REPORTED_MISSING EvtDeviceReportedMissing;
194 
195 } WDF_PDO_EVENT_CALLBACKS, *PWDF_PDO_EVENT_CALLBACKS;
196 
197 FORCEINLINE
198 VOID
199 WDF_PDO_EVENT_CALLBACKS_INIT(
200     _Out_ PWDF_PDO_EVENT_CALLBACKS Callbacks
201     )
202 {
203     RtlZeroMemory(Callbacks, sizeof(WDF_PDO_EVENT_CALLBACKS));
204     Callbacks->Size = sizeof(WDF_PDO_EVENT_CALLBACKS);
205 }
206 
207 //
208 // WDF Function: WdfPdoInitAllocate
209 //
210 typedef
211 _Must_inspect_result_
212 _IRQL_requires_max_(PASSIVE_LEVEL)
213 WDFAPI
214 PWDFDEVICE_INIT
215 (STDCALL *PFN_WDFPDOINITALLOCATE)(
216     _In_
217     PWDF_DRIVER_GLOBALS DriverGlobals,
218     _In_
219     WDFDEVICE ParentDevice
220     );
221 
222 _Must_inspect_result_
223 _IRQL_requires_max_(PASSIVE_LEVEL)
224 FORCEINLINE
225 PWDFDEVICE_INIT
226 WdfPdoInitAllocate(
227     _In_
228     WDFDEVICE ParentDevice
229     )
230 {
231     return ((PFN_WDFPDOINITALLOCATE) WdfFunctions[WdfPdoInitAllocateTableIndex])(WdfDriverGlobals, ParentDevice);
232 }
233 
234 //
235 // WDF Function: WdfPdoInitSetEventCallbacks
236 //
237 typedef
238 _IRQL_requires_max_(PASSIVE_LEVEL)
239 WDFAPI
240 VOID
241 (STDCALL *PFN_WDFPDOINITSETEVENTCALLBACKS)(
242     _In_
243     PWDF_DRIVER_GLOBALS DriverGlobals,
244     _In_
245     PWDFDEVICE_INIT DeviceInit,
246     _In_
247     PWDF_PDO_EVENT_CALLBACKS DispatchTable
248     );
249 
250 _IRQL_requires_max_(PASSIVE_LEVEL)
251 FORCEINLINE
252 VOID
253 WdfPdoInitSetEventCallbacks(
254     _In_
255     PWDFDEVICE_INIT DeviceInit,
256     _In_
257     PWDF_PDO_EVENT_CALLBACKS DispatchTable
258     )
259 {
260     ((PFN_WDFPDOINITSETEVENTCALLBACKS) WdfFunctions[WdfPdoInitSetEventCallbacksTableIndex])(WdfDriverGlobals, DeviceInit, DispatchTable);
261 }
262 
263 //
264 // WDF Function: WdfPdoInitAssignDeviceID
265 //
266 typedef
267 _Must_inspect_result_
268 _IRQL_requires_max_(PASSIVE_LEVEL)
269 WDFAPI
270 NTSTATUS
271 (STDCALL *PFN_WDFPDOINITASSIGNDEVICEID)(
272     _In_
273     PWDF_DRIVER_GLOBALS DriverGlobals,
274     _In_
275     PWDFDEVICE_INIT DeviceInit,
276     _In_
277     PCUNICODE_STRING DeviceID
278     );
279 
280 _Must_inspect_result_
281 _IRQL_requires_max_(PASSIVE_LEVEL)
282 FORCEINLINE
283 NTSTATUS
284 WdfPdoInitAssignDeviceID(
285     _In_
286     PWDFDEVICE_INIT DeviceInit,
287     _In_
288     PCUNICODE_STRING DeviceID
289     )
290 {
291     return ((PFN_WDFPDOINITASSIGNDEVICEID) WdfFunctions[WdfPdoInitAssignDeviceIDTableIndex])(WdfDriverGlobals, DeviceInit, DeviceID);
292 }
293 
294 //
295 // WDF Function: WdfPdoInitAssignInstanceID
296 //
297 typedef
298 _Must_inspect_result_
299 _IRQL_requires_max_(PASSIVE_LEVEL)
300 WDFAPI
301 NTSTATUS
302 (STDCALL *PFN_WDFPDOINITASSIGNINSTANCEID)(
303     _In_
304     PWDF_DRIVER_GLOBALS DriverGlobals,
305     _In_
306     PWDFDEVICE_INIT DeviceInit,
307     _In_
308     PCUNICODE_STRING InstanceID
309     );
310 
311 _Must_inspect_result_
312 _IRQL_requires_max_(PASSIVE_LEVEL)
313 FORCEINLINE
314 NTSTATUS
315 WdfPdoInitAssignInstanceID(
316     _In_
317     PWDFDEVICE_INIT DeviceInit,
318     _In_
319     PCUNICODE_STRING InstanceID
320     )
321 {
322     return ((PFN_WDFPDOINITASSIGNINSTANCEID) WdfFunctions[WdfPdoInitAssignInstanceIDTableIndex])(WdfDriverGlobals, DeviceInit, InstanceID);
323 }
324 
325 //
326 // WDF Function: WdfPdoInitAddHardwareID
327 //
328 typedef
329 _Must_inspect_result_
330 _IRQL_requires_max_(PASSIVE_LEVEL)
331 WDFAPI
332 NTSTATUS
333 (STDCALL *PFN_WDFPDOINITADDHARDWAREID)(
334     _In_
335     PWDF_DRIVER_GLOBALS DriverGlobals,
336     _In_
337     PWDFDEVICE_INIT DeviceInit,
338     _In_
339     PCUNICODE_STRING HardwareID
340     );
341 
342 _Must_inspect_result_
343 _IRQL_requires_max_(PASSIVE_LEVEL)
344 FORCEINLINE
345 NTSTATUS
346 WdfPdoInitAddHardwareID(
347     _In_
348     PWDFDEVICE_INIT DeviceInit,
349     _In_
350     PCUNICODE_STRING HardwareID
351     )
352 {
353     return ((PFN_WDFPDOINITADDHARDWAREID) WdfFunctions[WdfPdoInitAddHardwareIDTableIndex])(WdfDriverGlobals, DeviceInit, HardwareID);
354 }
355 
356 //
357 // WDF Function: WdfPdoInitAddCompatibleID
358 //
359 typedef
360 _Must_inspect_result_
361 _IRQL_requires_max_(PASSIVE_LEVEL)
362 WDFAPI
363 NTSTATUS
364 (STDCALL *PFN_WDFPDOINITADDCOMPATIBLEID)(
365     _In_
366     PWDF_DRIVER_GLOBALS DriverGlobals,
367     _In_
368     PWDFDEVICE_INIT DeviceInit,
369     _In_
370     PCUNICODE_STRING CompatibleID
371     );
372 
373 _Must_inspect_result_
374 _IRQL_requires_max_(PASSIVE_LEVEL)
375 FORCEINLINE
376 NTSTATUS
377 WdfPdoInitAddCompatibleID(
378     _In_
379     PWDFDEVICE_INIT DeviceInit,
380     _In_
381     PCUNICODE_STRING CompatibleID
382     )
383 {
384     return ((PFN_WDFPDOINITADDCOMPATIBLEID) WdfFunctions[WdfPdoInitAddCompatibleIDTableIndex])(WdfDriverGlobals, DeviceInit, CompatibleID);
385 }
386 
387 //
388 // WDF Function: WdfPdoInitAssignContainerID
389 //
390 typedef
391 _Must_inspect_result_
392 _IRQL_requires_max_(PASSIVE_LEVEL)
393 WDFAPI
394 NTSTATUS
395 (STDCALL *PFN_WDFPDOINITASSIGNCONTAINERID)(
396     _In_
397     PWDF_DRIVER_GLOBALS DriverGlobals,
398     _In_
399     PWDFDEVICE_INIT DeviceInit,
400     _In_
401     PCUNICODE_STRING ContainerID
402     );
403 
404 _Must_inspect_result_
405 _IRQL_requires_max_(PASSIVE_LEVEL)
406 FORCEINLINE
407 NTSTATUS
408 WdfPdoInitAssignContainerID(
409     _In_
410     PWDFDEVICE_INIT DeviceInit,
411     _In_
412     PCUNICODE_STRING ContainerID
413     )
414 {
415     return ((PFN_WDFPDOINITASSIGNCONTAINERID) WdfFunctions[WdfPdoInitAssignContainerIDTableIndex])(WdfDriverGlobals, DeviceInit, ContainerID);
416 }
417 
418 //
419 // WDF Function: WdfPdoInitAddDeviceText
420 //
421 typedef
422 _Must_inspect_result_
423 _IRQL_requires_max_(PASSIVE_LEVEL)
424 WDFAPI
425 NTSTATUS
426 (STDCALL *PFN_WDFPDOINITADDDEVICETEXT)(
427     _In_
428     PWDF_DRIVER_GLOBALS DriverGlobals,
429     _In_
430     PWDFDEVICE_INIT DeviceInit,
431     _In_
432     PCUNICODE_STRING DeviceDescription,
433     _In_
434     PCUNICODE_STRING DeviceLocation,
435     _In_
436     LCID LocaleId
437     );
438 
439 _Must_inspect_result_
440 _IRQL_requires_max_(PASSIVE_LEVEL)
441 FORCEINLINE
442 NTSTATUS
443 WdfPdoInitAddDeviceText(
444     _In_
445     PWDFDEVICE_INIT DeviceInit,
446     _In_
447     PCUNICODE_STRING DeviceDescription,
448     _In_
449     PCUNICODE_STRING DeviceLocation,
450     _In_
451     LCID LocaleId
452     )
453 {
454     return ((PFN_WDFPDOINITADDDEVICETEXT) WdfFunctions[WdfPdoInitAddDeviceTextTableIndex])(WdfDriverGlobals, DeviceInit, DeviceDescription, DeviceLocation, LocaleId);
455 }
456 
457 //
458 // WDF Function: WdfPdoInitSetDefaultLocale
459 //
460 typedef
461 _IRQL_requires_max_(PASSIVE_LEVEL)
462 WDFAPI
463 VOID
464 (STDCALL *PFN_WDFPDOINITSETDEFAULTLOCALE)(
465     _In_
466     PWDF_DRIVER_GLOBALS DriverGlobals,
467     _In_
468     PWDFDEVICE_INIT DeviceInit,
469     _In_
470     LCID LocaleId
471     );
472 
473 _IRQL_requires_max_(PASSIVE_LEVEL)
474 FORCEINLINE
475 VOID
476 WdfPdoInitSetDefaultLocale(
477     _In_
478     PWDFDEVICE_INIT DeviceInit,
479     _In_
480     LCID LocaleId
481     )
482 {
483     ((PFN_WDFPDOINITSETDEFAULTLOCALE) WdfFunctions[WdfPdoInitSetDefaultLocaleTableIndex])(WdfDriverGlobals, DeviceInit, LocaleId);
484 }
485 
486 //
487 // WDF Function: WdfPdoInitAssignRawDevice
488 //
489 typedef
490 _Must_inspect_result_
491 _IRQL_requires_max_(PASSIVE_LEVEL)
492 WDFAPI
493 NTSTATUS
494 (STDCALL *PFN_WDFPDOINITASSIGNRAWDEVICE)(
495     _In_
496     PWDF_DRIVER_GLOBALS DriverGlobals,
497     _In_
498     PWDFDEVICE_INIT DeviceInit,
499     _In_
500     CONST GUID* DeviceClassGuid
501     );
502 
503 _Must_inspect_result_
504 _IRQL_requires_max_(PASSIVE_LEVEL)
505 FORCEINLINE
506 NTSTATUS
507 WdfPdoInitAssignRawDevice(
508     _In_
509     PWDFDEVICE_INIT DeviceInit,
510     _In_
511     CONST GUID* DeviceClassGuid
512     )
513 {
514     return ((PFN_WDFPDOINITASSIGNRAWDEVICE) WdfFunctions[WdfPdoInitAssignRawDeviceTableIndex])(WdfDriverGlobals, DeviceInit, DeviceClassGuid);
515 }
516 
517 //
518 // WDF Function: WdfPdoInitAllowForwardingRequestToParent
519 //
520 typedef
521 _IRQL_requires_max_(PASSIVE_LEVEL)
522 WDFAPI
523 VOID
524 (STDCALL *PFN_WDFPDOINITALLOWFORWARDINGREQUESTTOPARENT)(
525     _In_
526     PWDF_DRIVER_GLOBALS DriverGlobals,
527     _In_
528     PWDFDEVICE_INIT DeviceInit
529     );
530 
531 _IRQL_requires_max_(PASSIVE_LEVEL)
532 FORCEINLINE
533 VOID
534 WdfPdoInitAllowForwardingRequestToParent(
535     _In_
536     PWDFDEVICE_INIT DeviceInit
537     )
538 {
539     ((PFN_WDFPDOINITALLOWFORWARDINGREQUESTTOPARENT) WdfFunctions[WdfPdoInitAllowForwardingRequestToParentTableIndex])(WdfDriverGlobals, DeviceInit);
540 }
541 
542 //
543 // WDF Function: WdfPdoMarkMissing
544 //
545 typedef
546 _Must_inspect_result_
547 _IRQL_requires_max_(DISPATCH_LEVEL)
548 WDFAPI
549 NTSTATUS
550 (STDCALL *PFN_WDFPDOMARKMISSING)(
551     _In_
552     PWDF_DRIVER_GLOBALS DriverGlobals,
553     _In_
554     WDFDEVICE Device
555     );
556 
557 _Must_inspect_result_
558 _IRQL_requires_max_(DISPATCH_LEVEL)
559 FORCEINLINE
560 NTSTATUS
561 WdfPdoMarkMissing(
562     _In_
563     WDFDEVICE Device
564     )
565 {
566     return ((PFN_WDFPDOMARKMISSING) WdfFunctions[WdfPdoMarkMissingTableIndex])(WdfDriverGlobals, Device);
567 }
568 
569 //
570 // WDF Function: WdfPdoRequestEject
571 //
572 typedef
573 _IRQL_requires_max_(DISPATCH_LEVEL)
574 WDFAPI
575 VOID
576 (STDCALL *PFN_WDFPDOREQUESTEJECT)(
577     _In_
578     PWDF_DRIVER_GLOBALS DriverGlobals,
579     _In_
580     WDFDEVICE Device
581     );
582 
583 _IRQL_requires_max_(DISPATCH_LEVEL)
584 FORCEINLINE
585 VOID
586 WdfPdoRequestEject(
587     _In_
588     WDFDEVICE Device
589     )
590 {
591     ((PFN_WDFPDOREQUESTEJECT) WdfFunctions[WdfPdoRequestEjectTableIndex])(WdfDriverGlobals, Device);
592 }
593 
594 //
595 // WDF Function: WdfPdoGetParent
596 //
597 typedef
598 _IRQL_requires_max_(DISPATCH_LEVEL)
599 WDFAPI
600 WDFDEVICE
601 (STDCALL *PFN_WDFPDOGETPARENT)(
602     _In_
603     PWDF_DRIVER_GLOBALS DriverGlobals,
604     _In_
605     WDFDEVICE Device
606     );
607 
608 _IRQL_requires_max_(DISPATCH_LEVEL)
609 FORCEINLINE
610 WDFDEVICE
611 WdfPdoGetParent(
612     _In_
613     WDFDEVICE Device
614     )
615 {
616     return ((PFN_WDFPDOGETPARENT) WdfFunctions[WdfPdoGetParentTableIndex])(WdfDriverGlobals, Device);
617 }
618 
619 //
620 // WDF Function: WdfPdoRetrieveIdentificationDescription
621 //
622 typedef
623 _Must_inspect_result_
624 _IRQL_requires_max_(DISPATCH_LEVEL)
625 WDFAPI
626 NTSTATUS
627 (STDCALL *PFN_WDFPDORETRIEVEIDENTIFICATIONDESCRIPTION)(
628     _In_
629     PWDF_DRIVER_GLOBALS DriverGlobals,
630     _In_
631     WDFDEVICE Device,
632     _Inout_
633     PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
634     );
635 
636 _Must_inspect_result_
637 _IRQL_requires_max_(DISPATCH_LEVEL)
638 FORCEINLINE
639 NTSTATUS
640 WdfPdoRetrieveIdentificationDescription(
641     _In_
642     WDFDEVICE Device,
643     _Inout_
644     PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
645     )
646 {
647     return ((PFN_WDFPDORETRIEVEIDENTIFICATIONDESCRIPTION) WdfFunctions[WdfPdoRetrieveIdentificationDescriptionTableIndex])(WdfDriverGlobals, Device, IdentificationDescription);
648 }
649 
650 //
651 // WDF Function: WdfPdoRetrieveAddressDescription
652 //
653 typedef
654 _Must_inspect_result_
655 _IRQL_requires_max_(DISPATCH_LEVEL)
656 WDFAPI
657 NTSTATUS
658 (STDCALL *PFN_WDFPDORETRIEVEADDRESSDESCRIPTION)(
659     _In_
660     PWDF_DRIVER_GLOBALS DriverGlobals,
661     _In_
662     WDFDEVICE Device,
663     _Inout_
664     PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
665     );
666 
667 _Must_inspect_result_
668 _IRQL_requires_max_(DISPATCH_LEVEL)
669 FORCEINLINE
670 NTSTATUS
671 WdfPdoRetrieveAddressDescription(
672     _In_
673     WDFDEVICE Device,
674     _Inout_
675     PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
676     )
677 {
678     return ((PFN_WDFPDORETRIEVEADDRESSDESCRIPTION) WdfFunctions[WdfPdoRetrieveAddressDescriptionTableIndex])(WdfDriverGlobals, Device, AddressDescription);
679 }
680 
681 //
682 // WDF Function: WdfPdoUpdateAddressDescription
683 //
684 typedef
685 _Must_inspect_result_
686 _IRQL_requires_max_(DISPATCH_LEVEL)
687 WDFAPI
688 NTSTATUS
689 (STDCALL *PFN_WDFPDOUPDATEADDRESSDESCRIPTION)(
690     _In_
691     PWDF_DRIVER_GLOBALS DriverGlobals,
692     _In_
693     WDFDEVICE Device,
694     _Inout_
695     PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
696     );
697 
698 _Must_inspect_result_
699 _IRQL_requires_max_(DISPATCH_LEVEL)
700 FORCEINLINE
701 NTSTATUS
702 WdfPdoUpdateAddressDescription(
703     _In_
704     WDFDEVICE Device,
705     _Inout_
706     PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
707     )
708 {
709     return ((PFN_WDFPDOUPDATEADDRESSDESCRIPTION) WdfFunctions[WdfPdoUpdateAddressDescriptionTableIndex])(WdfDriverGlobals, Device, AddressDescription);
710 }
711 
712 //
713 // WDF Function: WdfPdoAddEjectionRelationsPhysicalDevice
714 //
715 typedef
716 _Must_inspect_result_
717 _IRQL_requires_max_(DISPATCH_LEVEL)
718 WDFAPI
719 NTSTATUS
720 (STDCALL *PFN_WDFPDOADDEJECTIONRELATIONSPHYSICALDEVICE)(
721     _In_
722     PWDF_DRIVER_GLOBALS DriverGlobals,
723     _In_
724     WDFDEVICE Device,
725     _In_
726     PDEVICE_OBJECT PhysicalDevice
727     );
728 
729 _Must_inspect_result_
730 _IRQL_requires_max_(DISPATCH_LEVEL)
731 FORCEINLINE
732 NTSTATUS
733 WdfPdoAddEjectionRelationsPhysicalDevice(
734     _In_
735     WDFDEVICE Device,
736     _In_
737     PDEVICE_OBJECT PhysicalDevice
738     )
739 {
740     return ((PFN_WDFPDOADDEJECTIONRELATIONSPHYSICALDEVICE) WdfFunctions[WdfPdoAddEjectionRelationsPhysicalDeviceTableIndex])(WdfDriverGlobals, Device, PhysicalDevice);
741 }
742 
743 //
744 // WDF Function: WdfPdoRemoveEjectionRelationsPhysicalDevice
745 //
746 typedef
747 _IRQL_requires_max_(DISPATCH_LEVEL)
748 WDFAPI
749 VOID
750 (STDCALL *PFN_WDFPDOREMOVEEJECTIONRELATIONSPHYSICALDEVICE)(
751     _In_
752     PWDF_DRIVER_GLOBALS DriverGlobals,
753     _In_
754     WDFDEVICE Device,
755     _In_
756     PDEVICE_OBJECT PhysicalDevice
757     );
758 
759 _IRQL_requires_max_(DISPATCH_LEVEL)
760 FORCEINLINE
761 VOID
762 WdfPdoRemoveEjectionRelationsPhysicalDevice(
763     _In_
764     WDFDEVICE Device,
765     _In_
766     PDEVICE_OBJECT PhysicalDevice
767     )
768 {
769     ((PFN_WDFPDOREMOVEEJECTIONRELATIONSPHYSICALDEVICE) WdfFunctions[WdfPdoRemoveEjectionRelationsPhysicalDeviceTableIndex])(WdfDriverGlobals, Device, PhysicalDevice);
770 }
771 
772 //
773 // WDF Function: WdfPdoClearEjectionRelationsDevices
774 //
775 typedef
776 _IRQL_requires_max_(DISPATCH_LEVEL)
777 WDFAPI
778 VOID
779 (STDCALL *PFN_WDFPDOCLEAREJECTIONRELATIONSDEVICES)(
780     _In_
781     PWDF_DRIVER_GLOBALS DriverGlobals,
782     _In_
783     WDFDEVICE Device
784     );
785 
786 _IRQL_requires_max_(DISPATCH_LEVEL)
787 FORCEINLINE
788 VOID
789 WdfPdoClearEjectionRelationsDevices(
790     _In_
791     WDFDEVICE Device
792     )
793 {
794     ((PFN_WDFPDOCLEAREJECTIONRELATIONSDEVICES) WdfFunctions[WdfPdoClearEjectionRelationsDevicesTableIndex])(WdfDriverGlobals, Device);
795 }
796 
797 
798 
799 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
800 
801 
802 
803 WDF_EXTERN_C_END
804 
805 #endif // _WDFPDO_H_
806 
807