1 /*++
2
3 Copyright (c) Microsoft Corporation. All rights reserved.
4
5 _WdfVersionBuild_
6
7 Module Name:
8
9 WdfChildList.hpp
10
11 Abstract:
12
13 This module defines the set of APIs to manipulate a WDFCHILDLIST handle. A
14 WDFCHILDLIST handle maintains a list of descriptions representing
15 dynamically enumerated child devices.
16
17 Environment:
18
19 kernel mode only
20
21 Revision History:
22
23 --*/
24
25 //
26 // NOTE: This header is generated by stubwork. Please make any
27 // modifications to the corresponding template files
28 // (.x or .y) and use stubwork to regenerate the header
29 //
30
31 #ifndef _WDFCHILDLIST_H_
32 #define _WDFCHILDLIST_H_
33
34 #ifndef WDF_EXTERN_C
35 #ifdef __cplusplus
36 #define WDF_EXTERN_C extern "C"
37 #define WDF_EXTERN_C_START extern "C" {
38 #define WDF_EXTERN_C_END }
39 #else
40 #define WDF_EXTERN_C
41 #define WDF_EXTERN_C_START
42 #define WDF_EXTERN_C_END
43 #endif
44 #endif
45
46 WDF_EXTERN_C_START
47
48
49
50 #if (NTDDI_VERSION >= NTDDI_WIN2K)
51
52 typedef enum _WDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS {
53 WdfChildListRetrieveDeviceUndefined = 0,
54 WdfChildListRetrieveDeviceSuccess,
55 WdfChildListRetrieveDeviceNotYetCreated,
56 WdfChildListRetrieveDeviceNoSuchDevice,
57 } WDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS, *PWDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS;
58
59 typedef enum _WDF_RETRIEVE_CHILD_FLAGS {
60 WdfRetrieveUnspecified = 0x0000,
61 WdfRetrievePresentChildren = 0x0001,
62 WdfRetrieveMissingChildren = 0x0002,
63 WdfRetrievePendingChildren = 0x0004,
64 WdfRetrieveAddedChildren = (WdfRetrievePresentChildren | WdfRetrievePendingChildren),
65 WdfRetrieveAllChildren = (WdfRetrievePresentChildren | WdfRetrievePendingChildren | WdfRetrieveMissingChildren),
66 } WDF_RETRIEVE_CHILD_FLAGS;
67
68
69
70 typedef struct _WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER {
71 //
72 // Size in bytes of the entire description, including this header.
73 //
74 // Same value as WDF_CHILD_LIST_CONFIG::IdentificationDescriptionSize
75 // Used as a sanity check.
76 //
77 ULONG IdentificationDescriptionSize;
78 } WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER,
79 *PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER;
80
81 FORCEINLINE
82 VOID
WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_INIT(_Out_ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Header,_In_ ULONG IdentificationDescriptionSize)83 WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER_INIT(
84 _Out_ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Header,
85 _In_ ULONG IdentificationDescriptionSize
86 )
87 {
88 RtlZeroMemory(Header, IdentificationDescriptionSize);
89 Header->IdentificationDescriptionSize = IdentificationDescriptionSize;
90 }
91
92 typedef struct _WDF_CHILD_ADDRESS_DESCRIPTION_HEADER {
93 //
94 // Size in bytes of the entire description, including this header.
95 //
96 // Same value as WDF_CHILD_LIST_CONFIG::AddressDescriptionSize
97 // Used as a sanity check.
98 //
99 ULONG AddressDescriptionSize;
100 } WDF_CHILD_ADDRESS_DESCRIPTION_HEADER,
101 *PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER;
102
103 FORCEINLINE
104 VOID
WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_INIT(_Out_ PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER Header,_In_ ULONG AddressDescriptionSize)105 WDF_CHILD_ADDRESS_DESCRIPTION_HEADER_INIT(
106 _Out_ PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER Header,
107 _In_ ULONG AddressDescriptionSize
108 )
109 {
110 RtlZeroMemory(Header, AddressDescriptionSize);
111 Header->AddressDescriptionSize = AddressDescriptionSize;
112 }
113
114 typedef
115 _Function_class_(EVT_WDF_CHILD_LIST_CREATE_DEVICE)
116 _IRQL_requires_same_
117 _IRQL_requires_max_(PASSIVE_LEVEL)
118 NTSTATUS
119 STDCALL
120 EVT_WDF_CHILD_LIST_CREATE_DEVICE(
121 _In_
122 WDFCHILDLIST ChildList,
123 _In_
124 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
125 _In_
126 PWDFDEVICE_INIT ChildInit
127 );
128
129 typedef EVT_WDF_CHILD_LIST_CREATE_DEVICE *PFN_WDF_CHILD_LIST_CREATE_DEVICE;
130
131 typedef
132 _Function_class_(EVT_WDF_CHILD_LIST_SCAN_FOR_CHILDREN)
133 _IRQL_requires_same_
134 _IRQL_requires_max_(PASSIVE_LEVEL)
135 VOID
136 STDCALL
137 EVT_WDF_CHILD_LIST_SCAN_FOR_CHILDREN(
138 _In_
139 WDFCHILDLIST ChildList
140 );
141
142 typedef EVT_WDF_CHILD_LIST_SCAN_FOR_CHILDREN *PFN_WDF_CHILD_LIST_SCAN_FOR_CHILDREN;
143
144 typedef
145 _Function_class_(EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COPY)
146 _IRQL_requires_same_
147 _IRQL_requires_max_(DISPATCH_LEVEL)
148 VOID
149 STDCALL
150 EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COPY(
151 _In_
152 WDFCHILDLIST ChildList,
153 _In_
154 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER SourceIdentificationDescription,
155 _Out_
156 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER DestinationIdentificationDescription
157 );
158
159 typedef EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COPY *PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COPY;
160
161 typedef
162 _Function_class_(EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_DUPLICATE)
163 _IRQL_requires_same_
164 _IRQL_requires_max_(DISPATCH_LEVEL)
165 NTSTATUS
166 STDCALL
167 EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_DUPLICATE(
168 _In_
169 WDFCHILDLIST ChildList,
170 _In_
171 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER SourceIdentificationDescription,
172 _Out_
173 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER DestinationIdentificationDescription
174 );
175
176 typedef EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_DUPLICATE *PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_DUPLICATE;
177
178 typedef
179 _Function_class_(EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE)
180 _IRQL_requires_same_
181 _IRQL_requires_max_(DISPATCH_LEVEL)
182 BOOLEAN
183 STDCALL
184 EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE(
185 _In_
186 WDFCHILDLIST ChildList,
187 _In_
188 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER FirstIdentificationDescription,
189 _In_
190 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER SecondIdentificationDescription
191 );
192
193 typedef EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE *PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE;
194
195 typedef
196 _Function_class_(EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP)
197 _IRQL_requires_same_
198 _IRQL_requires_max_(DISPATCH_LEVEL)
199 VOID
200 STDCALL
201 EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP(
202 _In_
203 WDFCHILDLIST ChildList,
204 _Inout_
205 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
206 );
207
208 typedef EVT_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP *PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP;
209
210 typedef
211 _Function_class_(EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_COPY)
212 _IRQL_requires_same_
213 _IRQL_requires_max_(DISPATCH_LEVEL)
214 VOID
215 STDCALL
216 EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_COPY(
217 _In_
218 WDFCHILDLIST ChildList,
219 _In_
220 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER SourceAddressDescription,
221 _Out_
222 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER DestinationAddressDescription
223 );
224
225 typedef EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_COPY *PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_COPY;
226
227 typedef
228 _Function_class_(EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_DUPLICATE)
229 _IRQL_requires_same_
230 _IRQL_requires_max_(DISPATCH_LEVEL)
231 NTSTATUS
232 STDCALL
233 EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_DUPLICATE(
234 _In_
235 WDFCHILDLIST ChildList,
236 _In_
237 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER SourceAddressDescription,
238 _Out_
239 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER DestinationAddressDescription
240 );
241
242 typedef EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_DUPLICATE *PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_DUPLICATE;
243
244 typedef
245 _Function_class_(EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP)
246 _IRQL_requires_same_
247 _IRQL_requires_max_(DISPATCH_LEVEL)
248 VOID
249 STDCALL
250 EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP(
251 _In_
252 WDFCHILDLIST ChildList,
253 _Inout_
254 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
255 );
256
257 typedef EVT_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP *PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP;
258
259 typedef
260 _Function_class_(EVT_WDF_CHILD_LIST_DEVICE_REENUMERATED)
261 _IRQL_requires_same_
262 _IRQL_requires_max_(DISPATCH_LEVEL)
263 BOOLEAN
264 STDCALL
265 EVT_WDF_CHILD_LIST_DEVICE_REENUMERATED(
266 _In_
267 WDFCHILDLIST ChildList,
268 _In_
269 WDFDEVICE OldDevice,
270 _In_
271 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER OldAddressDescription,
272 _Out_
273 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER NewAddressDescription
274 );
275
276 typedef EVT_WDF_CHILD_LIST_DEVICE_REENUMERATED *PFN_WDF_CHILD_LIST_DEVICE_REENUMERATED;
277
278 typedef struct _WDF_CHILD_RETRIEVE_INFO {
279 //
280 // Size of the structure in bytes
281 //
282 ULONG Size;
283
284 //
285 // Must be a valid pointer when passed in, copied into upon success
286 //
287 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription;
288
289 //
290 // Optional pointer when passed in, copied into upon success
291 //
292 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription;
293
294 //
295 // Status of the returned device
296 //
297 WDF_CHILD_LIST_RETRIEVE_DEVICE_STATUS Status;
298
299 //
300 // If provided, will be used for searching through the list of devices
301 // instead of the default list ID compare function
302 //
303 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE EvtChildListIdentificationDescriptionCompare;
304
305 } WDF_CHILD_RETRIEVE_INFO, *PWDF_CHILD_RETRIEVE_INFO;
306
307 FORCEINLINE
308 VOID
WDF_CHILD_RETRIEVE_INFO_INIT(_Out_ PWDF_CHILD_RETRIEVE_INFO Info,_In_ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription)309 WDF_CHILD_RETRIEVE_INFO_INIT(
310 _Out_ PWDF_CHILD_RETRIEVE_INFO Info,
311 _In_ PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
312 )
313 {
314 RtlZeroMemory(Info, sizeof(WDF_CHILD_RETRIEVE_INFO));
315
316 Info->Size = sizeof(WDF_CHILD_RETRIEVE_INFO);
317 Info->IdentificationDescription = IdentificationDescription;
318 }
319
320 typedef struct _WDF_CHILD_LIST_CONFIG {
321 //
322 // Size of this structure in bytes
323 //
324 ULONG Size;
325
326 //
327 // The size in bytes of an identificaiton description to be used with the
328 // created WDFCHILDLIST handle
329 //
330 ULONG IdentificationDescriptionSize;
331
332 //
333 // Optional size in bytes of an address description to be used with the
334 // created WDFCHILDLIST handle.
335 //
336 ULONG AddressDescriptionSize;
337
338 //
339 // Required callback to be invoked when a description on the device list
340 // needs to be converted into a real WDFDEVICE handle.
341 //
342 PFN_WDF_CHILD_LIST_CREATE_DEVICE EvtChildListCreateDevice;
343
344 //
345 // Optional callback to be invoked when the device list needs to be
346 // rescanned. This function will be called after the device has entered D0
347 // and been fully initialized but before I/O has started.
348 //
349 PFN_WDF_CHILD_LIST_SCAN_FOR_CHILDREN EvtChildListScanForChildren;
350
351 //
352 // Optional callback to be invoked when an identification description needs
353 // to be copied from one location to another.
354 //
355 // If left NULL, RtlCopyMemory will be used to copy the description.
356 //
357 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COPY EvtChildListIdentificationDescriptionCopy;
358
359 //
360 // Optional callback to be invoked when an identification description needs
361 // to be duplicated. As opposed to EvtChildListIdentificationDescriptionCopy,
362 // EvtChildListIdentificationDescriptionDuplicate can fail.
363 //
364 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_DUPLICATE EvtChildListIdentificationDescriptionDuplicate;
365
366 //
367 // Optional callback to be invoked when an identification description needs
368 // to be cleaned up. This function should *NOT* free the description passed
369 // to it, just free any associated resources.
370 //
371 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_CLEANUP EvtChildListIdentificationDescriptionCleanup;
372
373 //
374 // Optional callback to be invoked when an identification description needs
375 // to be compared with another identificaiton description.
376 //
377 // If left NULL, RtlCompareMemory will be used to compare the two
378 // descriptions.
379 //
380 PFN_WDF_CHILD_LIST_IDENTIFICATION_DESCRIPTION_COMPARE EvtChildListIdentificationDescriptionCompare;
381
382 //
383 // Optional callback to be invoked when an address description needs
384 // to be copied from one location to another.
385 //
386 // If left NULL, RtlCopyMemory will be used to copy the description.
387 //
388 PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_COPY EvtChildListAddressDescriptionCopy;
389
390 //
391 // Optional callback to be invoked when an address description needs to be
392 // duplicated. As opposed to EvtChildListAddressDescriptionCopy,
393 // EvtChildListAddressDescriptionDuplicate can fail.
394 //
395 PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_DUPLICATE EvtChildListAddressDescriptionDuplicate;
396
397 //
398 // Optional callback to be invoked when an address description needs to be
399 // cleaned up. This function should *NOT* free the description passed to
400 // it, just free any associated resources.
401 //
402 PFN_WDF_CHILD_LIST_ADDRESS_DESCRIPTION_CLEANUP EvtChildListAddressDescriptionCleanup;
403
404 //
405 // If provided, will be called when the child's stack requests that the
406 // child be reenumerated. Returning TRUE allows for the reenumeration to
407 // proceed. FALSE will no reenumerate the stack.
408 //
409 PFN_WDF_CHILD_LIST_DEVICE_REENUMERATED EvtChildListDeviceReenumerated;
410
411 } WDF_CHILD_LIST_CONFIG, *PWDF_CHILD_LIST_CONFIG;
412
413 FORCEINLINE
414 VOID
WDF_CHILD_LIST_CONFIG_INIT(_Out_ PWDF_CHILD_LIST_CONFIG Config,_In_ ULONG IdentificationDescriptionSize,_In_ PFN_WDF_CHILD_LIST_CREATE_DEVICE EvtChildListCreateDevice)415 WDF_CHILD_LIST_CONFIG_INIT(
416 _Out_ PWDF_CHILD_LIST_CONFIG Config,
417 _In_ ULONG IdentificationDescriptionSize,
418 _In_ PFN_WDF_CHILD_LIST_CREATE_DEVICE EvtChildListCreateDevice
419 )
420 {
421 RtlZeroMemory(Config, sizeof(WDF_CHILD_LIST_CONFIG));
422
423 Config->Size = sizeof(WDF_CHILD_LIST_CONFIG);
424 Config->IdentificationDescriptionSize = IdentificationDescriptionSize;
425 Config->EvtChildListCreateDevice = EvtChildListCreateDevice;
426 }
427
428 typedef struct _WDF_CHILD_LIST_ITERATOR {
429 //
430 // Size of this structure in bytes
431 //
432 ULONG Size;
433
434 //
435 // What type of devices to return, see WDF_RETRIEVE_CHILD_FLAGS for
436 // flag values
437 //
438 //
439 ULONG Flags;
440
441 //
442 // For internal use, treat this field as opaque
443 //
444 PVOID Reserved[4];
445
446 } WDF_CHILD_LIST_ITERATOR, *PWDF_CHILD_LIST_ITERATOR;
447
448 FORCEINLINE
449 VOID
WDF_CHILD_LIST_ITERATOR_INIT(_Out_ PWDF_CHILD_LIST_ITERATOR Iterator,_In_ ULONG Flags)450 WDF_CHILD_LIST_ITERATOR_INIT(
451 _Out_ PWDF_CHILD_LIST_ITERATOR Iterator,
452 _In_ ULONG Flags
453 )
454 {
455 RtlZeroMemory(Iterator, sizeof(WDF_CHILD_LIST_ITERATOR));
456
457 Iterator->Size = sizeof(WDF_CHILD_LIST_ITERATOR);
458 Iterator->Flags = Flags;
459 }
460
461
462 //
463 // WDF Function: WdfChildListCreate
464 //
465 typedef
466 _Must_inspect_result_
467 _IRQL_requires_max_(PASSIVE_LEVEL)
468 WDFAPI
469 NTSTATUS
470 (STDCALL *PFN_WDFCHILDLISTCREATE)(
471 _In_
472 PWDF_DRIVER_GLOBALS DriverGlobals,
473 _In_
474 WDFDEVICE Device,
475 _In_
476 PWDF_CHILD_LIST_CONFIG Config,
477 _In_opt_
478 PWDF_OBJECT_ATTRIBUTES ChildListAttributes,
479 _Out_
480 WDFCHILDLIST* ChildList
481 );
482
483 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)484 _IRQL_requires_max_(PASSIVE_LEVEL)
485 FORCEINLINE
486 NTSTATUS
487 WdfChildListCreate(
488 _In_
489 WDFDEVICE Device,
490 _In_
491 PWDF_CHILD_LIST_CONFIG Config,
492 _In_opt_
493 PWDF_OBJECT_ATTRIBUTES ChildListAttributes,
494 _Out_
495 WDFCHILDLIST* ChildList
496 )
497 {
498 return ((PFN_WDFCHILDLISTCREATE) WdfFunctions[WdfChildListCreateTableIndex])(WdfDriverGlobals, Device, Config, ChildListAttributes, ChildList);
499 }
500
501 //
502 // WDF Function: WdfChildListGetDevice
503 //
504 typedef
505 _IRQL_requires_max_(DISPATCH_LEVEL)
506 WDFAPI
507 WDFDEVICE
508 (STDCALL *PFN_WDFCHILDLISTGETDEVICE)(
509 _In_
510 PWDF_DRIVER_GLOBALS DriverGlobals,
511 _In_
512 WDFCHILDLIST ChildList
513 );
514
_IRQL_requires_max_(DISPATCH_LEVEL)515 _IRQL_requires_max_(DISPATCH_LEVEL)
516 FORCEINLINE
517 WDFDEVICE
518 WdfChildListGetDevice(
519 _In_
520 WDFCHILDLIST ChildList
521 )
522 {
523 return ((PFN_WDFCHILDLISTGETDEVICE) WdfFunctions[WdfChildListGetDeviceTableIndex])(WdfDriverGlobals, ChildList);
524 }
525
526 //
527 // WDF Function: WdfChildListRetrievePdo
528 //
529 typedef
530 _Must_inspect_result_
531 _IRQL_requires_max_(DISPATCH_LEVEL)
532 WDFAPI
533 WDFDEVICE
534 (STDCALL *PFN_WDFCHILDLISTRETRIEVEPDO)(
535 _In_
536 PWDF_DRIVER_GLOBALS DriverGlobals,
537 _In_
538 WDFCHILDLIST ChildList,
539 _Inout_
540 PWDF_CHILD_RETRIEVE_INFO RetrieveInfo
541 );
542
543 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)544 _IRQL_requires_max_(DISPATCH_LEVEL)
545 FORCEINLINE
546 WDFDEVICE
547 WdfChildListRetrievePdo(
548 _In_
549 WDFCHILDLIST ChildList,
550 _Inout_
551 PWDF_CHILD_RETRIEVE_INFO RetrieveInfo
552 )
553 {
554 return ((PFN_WDFCHILDLISTRETRIEVEPDO) WdfFunctions[WdfChildListRetrievePdoTableIndex])(WdfDriverGlobals, ChildList, RetrieveInfo);
555 }
556
557 //
558 // WDF Function: WdfChildListRetrieveAddressDescription
559 //
560 typedef
561 _Must_inspect_result_
562 _IRQL_requires_max_(DISPATCH_LEVEL)
563 WDFAPI
564 NTSTATUS
565 (STDCALL *PFN_WDFCHILDLISTRETRIEVEADDRESSDESCRIPTION)(
566 _In_
567 PWDF_DRIVER_GLOBALS DriverGlobals,
568 _In_
569 WDFCHILDLIST ChildList,
570 _In_
571 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
572 _Inout_
573 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
574 );
575
576 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)577 _IRQL_requires_max_(DISPATCH_LEVEL)
578 FORCEINLINE
579 NTSTATUS
580 WdfChildListRetrieveAddressDescription(
581 _In_
582 WDFCHILDLIST ChildList,
583 _In_
584 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
585 _Inout_
586 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
587 )
588 {
589 return ((PFN_WDFCHILDLISTRETRIEVEADDRESSDESCRIPTION) WdfFunctions[WdfChildListRetrieveAddressDescriptionTableIndex])(WdfDriverGlobals, ChildList, IdentificationDescription, AddressDescription);
590 }
591
592 //
593 // WDF Function: WdfChildListBeginScan
594 //
595 typedef
596 _IRQL_requires_max_(DISPATCH_LEVEL)
597 WDFAPI
598 VOID
599 (STDCALL *PFN_WDFCHILDLISTBEGINSCAN)(
600 _In_
601 PWDF_DRIVER_GLOBALS DriverGlobals,
602 _In_
603 WDFCHILDLIST ChildList
604 );
605
_IRQL_requires_max_(DISPATCH_LEVEL)606 _IRQL_requires_max_(DISPATCH_LEVEL)
607 FORCEINLINE
608 VOID
609 WdfChildListBeginScan(
610 _In_
611 WDFCHILDLIST ChildList
612 )
613 {
614 ((PFN_WDFCHILDLISTBEGINSCAN) WdfFunctions[WdfChildListBeginScanTableIndex])(WdfDriverGlobals, ChildList);
615 }
616
617 //
618 // WDF Function: WdfChildListEndScan
619 //
620 typedef
621 _IRQL_requires_max_(DISPATCH_LEVEL)
622 WDFAPI
623 VOID
624 (STDCALL *PFN_WDFCHILDLISTENDSCAN)(
625 _In_
626 PWDF_DRIVER_GLOBALS DriverGlobals,
627 _In_
628 WDFCHILDLIST ChildList
629 );
630
_IRQL_requires_max_(DISPATCH_LEVEL)631 _IRQL_requires_max_(DISPATCH_LEVEL)
632 FORCEINLINE
633 VOID
634 WdfChildListEndScan(
635 _In_
636 WDFCHILDLIST ChildList
637 )
638 {
639 ((PFN_WDFCHILDLISTENDSCAN) WdfFunctions[WdfChildListEndScanTableIndex])(WdfDriverGlobals, ChildList);
640 }
641
642 //
643 // WDF Function: WdfChildListBeginIteration
644 //
645 typedef
646 _IRQL_requires_max_(DISPATCH_LEVEL)
647 WDFAPI
648 VOID
649 (STDCALL *PFN_WDFCHILDLISTBEGINITERATION)(
650 _In_
651 PWDF_DRIVER_GLOBALS DriverGlobals,
652 _In_
653 WDFCHILDLIST ChildList,
654 _In_
655 PWDF_CHILD_LIST_ITERATOR Iterator
656 );
657
_IRQL_requires_max_(DISPATCH_LEVEL)658 _IRQL_requires_max_(DISPATCH_LEVEL)
659 FORCEINLINE
660 VOID
661 WdfChildListBeginIteration(
662 _In_
663 WDFCHILDLIST ChildList,
664 _In_
665 PWDF_CHILD_LIST_ITERATOR Iterator
666 )
667 {
668 ((PFN_WDFCHILDLISTBEGINITERATION) WdfFunctions[WdfChildListBeginIterationTableIndex])(WdfDriverGlobals, ChildList, Iterator);
669 }
670
671 //
672 // WDF Function: WdfChildListRetrieveNextDevice
673 //
674 typedef
675 _Must_inspect_result_
676 _IRQL_requires_max_(DISPATCH_LEVEL)
677 WDFAPI
678 NTSTATUS
679 (STDCALL *PFN_WDFCHILDLISTRETRIEVENEXTDEVICE)(
680 _In_
681 PWDF_DRIVER_GLOBALS DriverGlobals,
682 _In_
683 WDFCHILDLIST ChildList,
684 _In_
685 PWDF_CHILD_LIST_ITERATOR Iterator,
686 _Out_
687 WDFDEVICE* Device,
688 _Inout_opt_
689 PWDF_CHILD_RETRIEVE_INFO Info
690 );
691
692 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)693 _IRQL_requires_max_(DISPATCH_LEVEL)
694 FORCEINLINE
695 NTSTATUS
696 WdfChildListRetrieveNextDevice(
697 _In_
698 WDFCHILDLIST ChildList,
699 _In_
700 PWDF_CHILD_LIST_ITERATOR Iterator,
701 _Out_
702 WDFDEVICE* Device,
703 _Inout_opt_
704 PWDF_CHILD_RETRIEVE_INFO Info
705 )
706 {
707 return ((PFN_WDFCHILDLISTRETRIEVENEXTDEVICE) WdfFunctions[WdfChildListRetrieveNextDeviceTableIndex])(WdfDriverGlobals, ChildList, Iterator, Device, Info);
708 }
709
710 //
711 // WDF Function: WdfChildListEndIteration
712 //
713 typedef
714 _IRQL_requires_max_(DISPATCH_LEVEL)
715 WDFAPI
716 VOID
717 (STDCALL *PFN_WDFCHILDLISTENDITERATION)(
718 _In_
719 PWDF_DRIVER_GLOBALS DriverGlobals,
720 _In_
721 WDFCHILDLIST ChildList,
722 _In_
723 PWDF_CHILD_LIST_ITERATOR Iterator
724 );
725
_IRQL_requires_max_(DISPATCH_LEVEL)726 _IRQL_requires_max_(DISPATCH_LEVEL)
727 FORCEINLINE
728 VOID
729 WdfChildListEndIteration(
730 _In_
731 WDFCHILDLIST ChildList,
732 _In_
733 PWDF_CHILD_LIST_ITERATOR Iterator
734 )
735 {
736 ((PFN_WDFCHILDLISTENDITERATION) WdfFunctions[WdfChildListEndIterationTableIndex])(WdfDriverGlobals, ChildList, Iterator);
737 }
738
739 //
740 // WDF Function: WdfChildListAddOrUpdateChildDescriptionAsPresent
741 //
742 typedef
743 _Must_inspect_result_
744 _IRQL_requires_max_(DISPATCH_LEVEL)
745 WDFAPI
746 NTSTATUS
747 (STDCALL *PFN_WDFCHILDLISTADDORUPDATECHILDDESCRIPTIONASPRESENT)(
748 _In_
749 PWDF_DRIVER_GLOBALS DriverGlobals,
750 _In_
751 WDFCHILDLIST ChildList,
752 _In_
753 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
754 _In_opt_
755 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
756 );
757
758 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)759 _IRQL_requires_max_(DISPATCH_LEVEL)
760 FORCEINLINE
761 NTSTATUS
762 WdfChildListAddOrUpdateChildDescriptionAsPresent(
763 _In_
764 WDFCHILDLIST ChildList,
765 _In_
766 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription,
767 _In_opt_
768 PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
769 )
770 {
771 return ((PFN_WDFCHILDLISTADDORUPDATECHILDDESCRIPTIONASPRESENT) WdfFunctions[WdfChildListAddOrUpdateChildDescriptionAsPresentTableIndex])(WdfDriverGlobals, ChildList, IdentificationDescription, AddressDescription);
772 }
773
774 //
775 // WDF Function: WdfChildListUpdateChildDescriptionAsMissing
776 //
777 typedef
778 _Must_inspect_result_
779 _IRQL_requires_max_(DISPATCH_LEVEL)
780 WDFAPI
781 NTSTATUS
782 (STDCALL *PFN_WDFCHILDLISTUPDATECHILDDESCRIPTIONASMISSING)(
783 _In_
784 PWDF_DRIVER_GLOBALS DriverGlobals,
785 _In_
786 WDFCHILDLIST ChildList,
787 _In_
788 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
789 );
790
791 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)792 _IRQL_requires_max_(DISPATCH_LEVEL)
793 FORCEINLINE
794 NTSTATUS
795 WdfChildListUpdateChildDescriptionAsMissing(
796 _In_
797 WDFCHILDLIST ChildList,
798 _In_
799 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
800 )
801 {
802 return ((PFN_WDFCHILDLISTUPDATECHILDDESCRIPTIONASMISSING) WdfFunctions[WdfChildListUpdateChildDescriptionAsMissingTableIndex])(WdfDriverGlobals, ChildList, IdentificationDescription);
803 }
804
805 //
806 // WDF Function: WdfChildListUpdateAllChildDescriptionsAsPresent
807 //
808 typedef
809 _IRQL_requires_max_(DISPATCH_LEVEL)
810 WDFAPI
811 VOID
812 (STDCALL *PFN_WDFCHILDLISTUPDATEALLCHILDDESCRIPTIONSASPRESENT)(
813 _In_
814 PWDF_DRIVER_GLOBALS DriverGlobals,
815 _In_
816 WDFCHILDLIST ChildList
817 );
818
_IRQL_requires_max_(DISPATCH_LEVEL)819 _IRQL_requires_max_(DISPATCH_LEVEL)
820 FORCEINLINE
821 VOID
822 WdfChildListUpdateAllChildDescriptionsAsPresent(
823 _In_
824 WDFCHILDLIST ChildList
825 )
826 {
827 ((PFN_WDFCHILDLISTUPDATEALLCHILDDESCRIPTIONSASPRESENT) WdfFunctions[WdfChildListUpdateAllChildDescriptionsAsPresentTableIndex])(WdfDriverGlobals, ChildList);
828 }
829
830 //
831 // WDF Function: WdfChildListRequestChildEject
832 //
833 typedef
834 _IRQL_requires_max_(DISPATCH_LEVEL)
835 WDFAPI
836 BOOLEAN
837 (STDCALL *PFN_WDFCHILDLISTREQUESTCHILDEJECT)(
838 _In_
839 PWDF_DRIVER_GLOBALS DriverGlobals,
840 _In_
841 WDFCHILDLIST ChildList,
842 _In_
843 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
844 );
845
_IRQL_requires_max_(DISPATCH_LEVEL)846 _IRQL_requires_max_(DISPATCH_LEVEL)
847 FORCEINLINE
848 BOOLEAN
849 WdfChildListRequestChildEject(
850 _In_
851 WDFCHILDLIST ChildList,
852 _In_
853 PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
854 )
855 {
856 return ((PFN_WDFCHILDLISTREQUESTCHILDEJECT) WdfFunctions[WdfChildListRequestChildEjectTableIndex])(WdfDriverGlobals, ChildList, IdentificationDescription);
857 }
858
859
860
861 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
862
863
864
865 WDF_EXTERN_C_END
866
867 #endif // _WDFCHILDLIST_H_
868
869