ReactOS  0.4.15-dev-2701-g34593d9
wdfio.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  wdfio.h
10 
11 Abstract:
12 
13  This module contains contains the Windows Driver Framework I/O
14  interfaces.
15 
16 Environment:
17 
18  kernel mode only
19 
20 Revision History:
21 
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 _WDFIO_H_
32 #define _WDFIO_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 
47 
48 
49 
50 #if (NTDDI_VERSION >= NTDDI_WIN2K)
51 
52 //
53 // Types
54 //
55 
56 //
57 // This defines the dispatch type of the queue. This controls how
58 // the queue raises I/O events to the driver through the registered
59 // callbacks.
60 //
61 // Sequential allows the driver to have the queue automatically dispatch
62 // one request at a time, and will hold requests until a current request
63 // is completed.
64 //
65 // Parallel has the queue dispatch requests to the driver as they arrive
66 // at the queue, and the queue is in a processing state. The driver can
67 // look at the requests in real time, and decide to service them, forward them
68 // to another queue, pend them, or return a status to have the queue held
69 // due to a hardware or other resource limit.
70 //
71 // Manual allows the driver to create multiple queues for requests, and control
72 // when it wants to retrieve requests from the queue by calling the queues
73 // WdfIoQueueRetrieveNextRequest() API.
74 //
75 
83 
84 //
85 // This defines the status of the queue.
86 //
87 // WdfIoQueueAcceptRequests - If TRUE, Queue will accept requests from WDM
88 // dispatch through WdfDeviceConfigureRequestDispatching,
89 // or from WdfRequestForwardToIoQueue.
90 //
91 // If FALSE, Queue will complete requests with
92 // STATUS_CANCELLED from WdfDeviceConfigureRequestDispatching,
93 // and fail WdfRequestForwardToIoQueue with
94 // STATUS_WDF_BUSY.
95 //
96 //
97 // WdfIoQueueDispatchRequests - If TRUE, and the Queue is configured for
98 // automatic dispatch as either
99 // WdfIoQueueDispatchSequential,
100 // or WdfIoQueueDispatchParallel, the Queue will
101 // present the requests to the driver according
102 // to the drivers configuration.
103 //
104 // If FALSE, requests are not automatically
105 // presented to the device driver.
106 //
107 // This has no effect on the drivers ability to
108 // retrieve requests with WdfIoQueueRetrieveNextRequest.
109 //
110 // WdfIoQueueNoRequests - If TRUE, the Queue has no requests to present
111 // or return to the device driver.
112 //
113 // WdfIoQueueDriverNoRequests - If TRUE, the device driver is not operating
114 // on any requests retrieved from or presented
115 // by this Queue.
116 //
117 // WdfIoQueuePnpHeld - The Framework PnP stage has requested that
118 // the device driver stop receiving new requests.
119 //
120 // Automatic request dispatch stops, and
121 // WdfIoQueueRetrieveNextRequest returns STATUS_WDF_BUSY.
122 //
123 
124 typedef enum _WDF_IO_QUEUE_STATE {
131 
132 
133 
134 
135 //
136 // These macros represent some common Queue states
137 //
138 
139 //
140 // A Queue is idle if it has no requests, and the driver
141 // is not operating on any.
142 //
143 
145 BOOLEAN
148  )
149 {
150  return ((State & WdfIoQueueNoRequests) &&
152 }
153 
154 //
155 // A Queue is ready if it can accept and dispatch requests and
156 // queue is not held by PNP
157 //
159 BOOLEAN
162  )
163 {
164  return ((State & WdfIoQueueDispatchRequests) &&
166  ((State & WdfIoQueuePnpHeld)==0)) ? TRUE: FALSE;
167 }
168 
169 //
170 // A Queue is stopped if it can accept new requests, but
171 // is not automatically delivering them to the device driver,
172 // and the queue is idle.
173 //
175 BOOLEAN
178  )
179 {
180  return (((State & WdfIoQueueDispatchRequests) == 0) &&
183 
184 }
185 
186 //
187 // A Queue is drained if it can not accept new requests but
188 // can dispatch existing requests, and there are no requests
189 // either in the Queue or the device driver.
190 //
191 
193 BOOLEAN
196  )
197 {
198  return ( ((State & WdfIoQueueAcceptRequests)==0) &&
202 
203 }
204 
205 //
206 // A Queue is purged if it can not accept new requests
207 // and there are no requests either in the Queue or
208 // the device driver.
209 //
211 BOOLEAN
214  )
215 {
216  return ( ((State & WdfIoQueueAcceptRequests)==0) &&
219 
220 }
221 
222 //
223 // Event callback definitions
224 //
225 
226 typedef
227 _Function_class_(EVT_WDF_IO_QUEUE_IO_DEFAULT)
230 VOID
231 STDCALL
232 EVT_WDF_IO_QUEUE_IO_DEFAULT(
233  _In_
234  WDFQUEUE Queue,
235  _In_
236  WDFREQUEST Request
237  );
238 
239 typedef EVT_WDF_IO_QUEUE_IO_DEFAULT *PFN_WDF_IO_QUEUE_IO_DEFAULT;
240 
241 
242 typedef
243 _Function_class_(EVT_WDF_IO_QUEUE_IO_STOP)
246 VOID
247 STDCALL
248 EVT_WDF_IO_QUEUE_IO_STOP(
249  _In_
250  WDFQUEUE Queue,
251  _In_
252  WDFREQUEST Request,
253  _In_
255  );
256 
257 typedef EVT_WDF_IO_QUEUE_IO_STOP *PFN_WDF_IO_QUEUE_IO_STOP;
258 
259 typedef
260 _Function_class_(EVT_WDF_IO_QUEUE_IO_RESUME)
263 VOID
264 STDCALL
265 EVT_WDF_IO_QUEUE_IO_RESUME(
266  _In_
267  WDFQUEUE Queue,
268  _In_
269  WDFREQUEST Request
270  );
271 
272 typedef EVT_WDF_IO_QUEUE_IO_RESUME *PFN_WDF_IO_QUEUE_IO_RESUME;
273 
274 typedef
275 _Function_class_(EVT_WDF_IO_QUEUE_IO_READ)
278 VOID
279 STDCALL
280 EVT_WDF_IO_QUEUE_IO_READ(
281  _In_
282  WDFQUEUE Queue,
283  _In_
284  WDFREQUEST Request,
285  _In_
286  size_t Length
287  );
288 
289 typedef EVT_WDF_IO_QUEUE_IO_READ *PFN_WDF_IO_QUEUE_IO_READ;
290 
291 typedef
292 _Function_class_(EVT_WDF_IO_QUEUE_IO_WRITE)
295 VOID
296 STDCALL
297 EVT_WDF_IO_QUEUE_IO_WRITE(
298  _In_
299  WDFQUEUE Queue,
300  _In_
301  WDFREQUEST Request,
302  _In_
303  size_t Length
304  );
305 
306 typedef EVT_WDF_IO_QUEUE_IO_WRITE *PFN_WDF_IO_QUEUE_IO_WRITE;
307 
308 typedef
309 _Function_class_(EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL)
312 VOID
313 STDCALL
314 EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL(
315  _In_
316  WDFQUEUE Queue,
317  _In_
318  WDFREQUEST Request,
319  _In_
320  size_t OutputBufferLength,
321  _In_
322  size_t InputBufferLength,
323  _In_
325  );
326 
327 typedef EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL *PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL;
328 
329 typedef
330 _Function_class_(EVT_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL)
333 VOID
334 STDCALL
335 EVT_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL(
336  _In_
337  WDFQUEUE Queue,
338  _In_
339  WDFREQUEST Request,
340  _In_
341  size_t OutputBufferLength,
342  _In_
343  size_t InputBufferLength,
344  _In_
346  );
347 
348 typedef EVT_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL *PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL;
349 
350 
351 typedef
352 _Function_class_(EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE)
355 VOID
356 STDCALL
357 EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE(
358  _In_
359  WDFQUEUE Queue,
360  _In_
361  WDFREQUEST Request
362  );
363 
364 typedef EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE *PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE;
365 
366 
367 typedef
368 _Function_class_(EVT_WDF_IO_QUEUE_STATE)
371 VOID
372 STDCALL
373 EVT_WDF_IO_QUEUE_STATE(
374  _In_
375  WDFQUEUE Queue,
376  _In_
378  );
379 
380 typedef EVT_WDF_IO_QUEUE_STATE *PFN_WDF_IO_QUEUE_STATE;
381 
382 //
383 // This is the structure used to configure an IoQueue and
384 // register callback events to it.
385 //
386 
387 typedef struct _WDF_IO_QUEUE_CONFIG {
388 
390 
392 
394 
396 
398 
400 
402 
404 
406 
408 
410 
412 
414 
415  union {
416  struct {
418  } Parallel;
419  } Settings;
420 
421  WDFDRIVER Driver;
423 
425 VOID
428  _In_ WDF_IO_QUEUE_DISPATCH_TYPE DispatchType
429  )
430 {
432 
433  Config->Size = sizeof(WDF_IO_QUEUE_CONFIG);
434  Config->PowerManaged = WdfUseDefault;
435  Config->DispatchType = DispatchType;
436  if (Config->DispatchType == WdfIoQueueDispatchParallel) {
437  Config->Settings.Parallel.NumberOfPresentedRequests = (ULONG)-1;
438  }
439 }
440 
442 VOID
445  _In_ WDF_IO_QUEUE_DISPATCH_TYPE DispatchType
446  )
447 {
449 
450  Config->Size = sizeof(WDF_IO_QUEUE_CONFIG);
451  Config->PowerManaged = WdfUseDefault;
452  Config->DefaultQueue = TRUE;
453  Config->DispatchType = DispatchType;
454  if (Config->DispatchType == WdfIoQueueDispatchParallel) {
455  Config->Settings.Parallel.NumberOfPresentedRequests = (ULONG)-1;
456  }
457 }
458 
464 
471 
472 typedef
473 _Function_class_(EVT_WDF_IO_ALLOCATE_RESOURCES_FOR_RESERVED_REQUEST)
476 NTSTATUS
477 STDCALL
478 EVT_WDF_IO_ALLOCATE_RESOURCES_FOR_RESERVED_REQUEST(
479  _In_
480  WDFQUEUE Queue,
481  _In_
482  WDFREQUEST Request
483  );
484 
485 typedef EVT_WDF_IO_ALLOCATE_RESOURCES_FOR_RESERVED_REQUEST *PFN_WDF_IO_ALLOCATE_RESOURCES_FOR_RESERVED_REQUEST;
486 
487 typedef
488 _Function_class_(EVT_WDF_IO_ALLOCATE_REQUEST_RESOURCES)
491 NTSTATUS
492 STDCALL
493 EVT_WDF_IO_ALLOCATE_REQUEST_RESOURCES(
494  _In_
495  WDFQUEUE Queue,
496  _In_
497  WDFREQUEST Request
498  );
499 
500 typedef EVT_WDF_IO_ALLOCATE_REQUEST_RESOURCES *PFN_WDF_IO_ALLOCATE_REQUEST_RESOURCES;
501 
502 typedef
503 _Function_class_(EVT_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS)
507 STDCALL
508 EVT_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS(
509  _In_
510  WDFQUEUE Queue,
511  _In_
512  PIRP Irp
513  );
514 
515 typedef EVT_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS *PFN_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS;
516 
518  union {
519 
520  struct {
522  } ExaminePolicy;
523 
524  } Policy;
526 
529 
531 
532  //
533  // Specify the type of the policy here.
534  //
536 
537  //
538  // Structure which contains the policy specific fields
539  //
541 
542  //
543  // Callback for reserved request given at initialization time
544  //
546 
547  //
548  // Callback for reserved request given at run time
549  //
551 
553 
555 VOID
558  _In_ ULONG TotalForwardProgressRequests
559  )
560 {
562 
564  Policy->TotalForwardProgressRequests = TotalForwardProgressRequests;
566 }
567 
568 
570 VOID
573  _In_ ULONG TotalForwardProgressRequests,
574  _In_ PFN_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS EvtIoWdmIrpForForwardProgress
575  )
576 {
578 
580  Policy->TotalForwardProgressRequests = TotalForwardProgressRequests;
581  Policy->ForwardProgressReservedPolicy = WdfIoForwardProgressReservedPolicyUseExamine;
582  Policy->ForwardProgressReservePolicySettings.Policy.ExaminePolicy.EvtIoWdmIrpForForwardProgress =
583  EvtIoWdmIrpForForwardProgress;
584 }
585 
587 VOID
590  _In_ ULONG TotalForwardProgressRequests
591  )
592 {
594 
596  Policy->TotalForwardProgressRequests = TotalForwardProgressRequests;
597  Policy->ForwardProgressReservedPolicy = WdfIoForwardProgressReservedPolicyPagingIO;
598 }
599 
600 
601 //
602 // WDF Function: WdfIoQueueCreate
603 //
604 typedef
607 WDFAPI
608 NTSTATUS
609 (STDCALL *PFN_WDFIOQUEUECREATE)(
610  _In_
612  _In_
613  WDFDEVICE Device,
614  _In_
616  _In_opt_
618  _Out_opt_
619  WDFQUEUE* Queue
620  );
621 
625 NTSTATUS
626 WdfIoQueueCreate(
627  _In_
628  WDFDEVICE Device,
629  _In_
631  _In_opt_
633  _Out_opt_
634  WDFQUEUE* Queue
635  )
636 {
638 }
639 
640 //
641 // WDF Function: WdfIoQueueGetState
642 //
643 typedef
645 WDFAPI
647 (STDCALL *PFN_WDFIOQUEUEGETSTATE)(
648  _In_
650  _In_
651  WDFQUEUE Queue,
652  _Out_opt_
654  _Out_opt_
656  );
657 
661 WdfIoQueueGetState(
662  _In_
663  WDFQUEUE Queue,
664  _Out_opt_
666  _Out_opt_
668  )
669 {
671 }
672 
673 //
674 // WDF Function: WdfIoQueueStart
675 //
676 typedef
678 WDFAPI
679 VOID
680 (STDCALL *PFN_WDFIOQUEUESTART)(
681  _In_
683  _In_
684  WDFQUEUE Queue
685  );
686 
689 VOID
690 WdfIoQueueStart(
691  _In_
692  WDFQUEUE Queue
693  )
694 {
696 }
697 
698 //
699 // WDF Function: WdfIoQueueStop
700 //
701 typedef
703 WDFAPI
704 VOID
705 (STDCALL *PFN_WDFIOQUEUESTOP)(
706  _In_
708  _In_
709  WDFQUEUE Queue,
711  _When_(Context == 0, _In_opt_)
713  _When_(StopComplete != 0, _In_)
716  );
717 
720 VOID
721 WdfIoQueueStop(
722  _In_
723  WDFQUEUE Queue,
724  _When_(Context != 0, _In_)
725  _When_(Context == 0, _In_opt_)
727  _When_(StopComplete != 0, _In_)
730  )
731 {
733 }
734 
735 //
736 // WDF Function: WdfIoQueueStopSynchronously
737 //
738 typedef
740 WDFAPI
741 VOID
742 (STDCALL *PFN_WDFIOQUEUESTOPSYNCHRONOUSLY)(
743  _In_
745  _In_
746  WDFQUEUE Queue
747  );
748 
751 VOID
752 WdfIoQueueStopSynchronously(
753  _In_
754  WDFQUEUE Queue
755  )
756 {
757  ((PFN_WDFIOQUEUESTOPSYNCHRONOUSLY) WdfFunctions[WdfIoQueueStopSynchronouslyTableIndex])(WdfDriverGlobals, Queue);
758 }
759 
760 //
761 // WDF Function: WdfIoQueueGetDevice
762 //
763 typedef
765 WDFAPI
766 WDFDEVICE
767 (STDCALL *PFN_WDFIOQUEUEGETDEVICE)(
768  _In_
770  _In_
771  WDFQUEUE Queue
772  );
773 
776 WDFDEVICE
777 WdfIoQueueGetDevice(
778  _In_
779  WDFQUEUE Queue
780  )
781 {
782  return ((PFN_WDFIOQUEUEGETDEVICE) WdfFunctions[WdfIoQueueGetDeviceTableIndex])(WdfDriverGlobals, Queue);
783 }
784 
785 //
786 // WDF Function: WdfIoQueueRetrieveNextRequest
787 //
788 typedef
791 WDFAPI
792 NTSTATUS
793 (STDCALL *PFN_WDFIOQUEUERETRIEVENEXTREQUEST)(
794  _In_
796  _In_
797  WDFQUEUE Queue,
798  _Out_
799  WDFREQUEST* OutRequest
800  );
801 
805 NTSTATUS
806 WdfIoQueueRetrieveNextRequest(
807  _In_
808  WDFQUEUE Queue,
809  _Out_
810  WDFREQUEST* OutRequest
811  )
812 {
813  return ((PFN_WDFIOQUEUERETRIEVENEXTREQUEST) WdfFunctions[WdfIoQueueRetrieveNextRequestTableIndex])(WdfDriverGlobals, Queue, OutRequest);
814 }
815 
816 //
817 // WDF Function: WdfIoQueueRetrieveRequestByFileObject
818 //
819 typedef
822 WDFAPI
823 NTSTATUS
824 (STDCALL *PFN_WDFIOQUEUERETRIEVEREQUESTBYFILEOBJECT)(
825  _In_
827  _In_
828  WDFQUEUE Queue,
829  _In_
830  WDFFILEOBJECT FileObject,
831  _Out_
832  WDFREQUEST* OutRequest
833  );
834 
838 NTSTATUS
839 WdfIoQueueRetrieveRequestByFileObject(
840  _In_
841  WDFQUEUE Queue,
842  _In_
843  WDFFILEOBJECT FileObject,
844  _Out_
845  WDFREQUEST* OutRequest
846  )
847 {
848  return ((PFN_WDFIOQUEUERETRIEVEREQUESTBYFILEOBJECT) WdfFunctions[WdfIoQueueRetrieveRequestByFileObjectTableIndex])(WdfDriverGlobals, Queue, FileObject, OutRequest);
849 }
850 
851 //
852 // WDF Function: WdfIoQueueFindRequest
853 //
854 typedef
857 WDFAPI
858 NTSTATUS
859 (STDCALL *PFN_WDFIOQUEUEFINDREQUEST)(
860  _In_
862  _In_
863  WDFQUEUE Queue,
864  _In_opt_
865  WDFREQUEST FoundRequest,
866  _In_opt_
867  WDFFILEOBJECT FileObject,
870  _Out_
871  WDFREQUEST* OutRequest
872  );
873 
877 NTSTATUS
878 WdfIoQueueFindRequest(
879  _In_
880  WDFQUEUE Queue,
881  _In_opt_
882  WDFREQUEST FoundRequest,
883  _In_opt_
884  WDFFILEOBJECT FileObject,
887  _Out_
888  WDFREQUEST* OutRequest
889  )
890 {
892 }
893 
894 //
895 // WDF Function: WdfIoQueueRetrieveFoundRequest
896 //
897 typedef
900 WDFAPI
901 NTSTATUS
902 (STDCALL *PFN_WDFIOQUEUERETRIEVEFOUNDREQUEST)(
903  _In_
905  _In_
906  WDFQUEUE Queue,
907  _In_
908  WDFREQUEST FoundRequest,
909  _Out_
910  WDFREQUEST* OutRequest
911  );
912 
916 NTSTATUS
917 WdfIoQueueRetrieveFoundRequest(
918  _In_
919  WDFQUEUE Queue,
920  _In_
921  WDFREQUEST FoundRequest,
922  _Out_
923  WDFREQUEST* OutRequest
924  )
925 {
926  return ((PFN_WDFIOQUEUERETRIEVEFOUNDREQUEST) WdfFunctions[WdfIoQueueRetrieveFoundRequestTableIndex])(WdfDriverGlobals, Queue, FoundRequest, OutRequest);
927 }
928 
929 //
930 // WDF Function: WdfIoQueueDrainSynchronously
931 //
932 typedef
934 WDFAPI
935 VOID
936 (STDCALL *PFN_WDFIOQUEUEDRAINSYNCHRONOUSLY)(
937  _In_
939  _In_
940  WDFQUEUE Queue
941  );
942 
945 VOID
946 WdfIoQueueDrainSynchronously(
947  _In_
948  WDFQUEUE Queue
949  )
950 {
951  ((PFN_WDFIOQUEUEDRAINSYNCHRONOUSLY) WdfFunctions[WdfIoQueueDrainSynchronouslyTableIndex])(WdfDriverGlobals, Queue);
952 }
953 
954 //
955 // WDF Function: WdfIoQueueDrain
956 //
957 typedef
959 WDFAPI
960 VOID
961 (STDCALL *PFN_WDFIOQUEUEDRAIN)(
962  _In_
964  _In_
965  WDFQUEUE Queue,
966  _When_(Context != 0, _In_)
967  _When_(Context == 0, _In_opt_)
969  _When_(DrainComplete != 0, _In_)
972  );
973 
976 VOID
977 WdfIoQueueDrain(
978  _In_
979  WDFQUEUE Queue,
980  _When_(Context != 0, _In_)
981  _When_(Context == 0, _In_opt_)
983  _When_(DrainComplete != 0, _In_)
986  )
987 {
989 }
990 
991 //
992 // WDF Function: WdfIoQueuePurgeSynchronously
993 //
994 typedef
996 WDFAPI
997 VOID
998 (STDCALL *PFN_WDFIOQUEUEPURGESYNCHRONOUSLY)(
999  _In_
1001  _In_
1002  WDFQUEUE Queue
1003  );
1004 
1007 VOID
1008 WdfIoQueuePurgeSynchronously(
1009  _In_
1010  WDFQUEUE Queue
1011  )
1012 {
1013  ((PFN_WDFIOQUEUEPURGESYNCHRONOUSLY) WdfFunctions[WdfIoQueuePurgeSynchronouslyTableIndex])(WdfDriverGlobals, Queue);
1014 }
1015 
1016 //
1017 // WDF Function: WdfIoQueuePurge
1018 //
1019 typedef
1021 WDFAPI
1022 VOID
1023 (STDCALL *PFN_WDFIOQUEUEPURGE)(
1024  _In_
1026  _In_
1027  WDFQUEUE Queue,
1028  _When_(Context != 0, _In_)
1029  _When_(Context == 0, _In_opt_)
1031  _When_(PurgeComplete != 0, _In_)
1034  );
1035 
1038 VOID
1039 WdfIoQueuePurge(
1040  _In_
1041  WDFQUEUE Queue,
1042  _When_(Context != 0, _In_)
1043  _When_(Context == 0, _In_opt_)
1045  _When_(PurgeComplete != 0, _In_)
1048  )
1049 {
1051 }
1052 
1053 //
1054 // WDF Function: WdfIoQueueReadyNotify
1055 //
1056 typedef
1059 WDFAPI
1060 NTSTATUS
1061 (STDCALL *PFN_WDFIOQUEUEREADYNOTIFY)(
1062  _In_
1064  _In_
1065  WDFQUEUE Queue,
1066  _In_opt_
1068  _In_opt_
1070  );
1071 
1075 NTSTATUS
1076 WdfIoQueueReadyNotify(
1077  _In_
1078  WDFQUEUE Queue,
1079  _In_opt_
1081  _In_opt_
1083  )
1084 {
1085  return ((PFN_WDFIOQUEUEREADYNOTIFY) WdfFunctions[WdfIoQueueReadyNotifyTableIndex])(WdfDriverGlobals, Queue, QueueReady, Context);
1086 }
1087 
1088 //
1089 // WDF Function: WdfIoQueueAssignForwardProgressPolicy
1090 //
1091 typedef
1094 WDFAPI
1095 NTSTATUS
1096 (STDCALL *PFN_WDFIOQUEUEASSIGNFORWARDPROGRESSPOLICY)(
1097  _In_
1099  _In_
1100  WDFQUEUE Queue,
1101  _In_
1103  );
1104 
1108 NTSTATUS
1109 WdfIoQueueAssignForwardProgressPolicy(
1110  _In_
1111  WDFQUEUE Queue,
1112  _In_
1114  )
1115 {
1116  return ((PFN_WDFIOQUEUEASSIGNFORWARDPROGRESSPOLICY) WdfFunctions[WdfIoQueueAssignForwardProgressPolicyTableIndex])(WdfDriverGlobals, Queue, ForwardProgressPolicy);
1117 }
1118 
1119 //
1120 // WDF Function: WdfIoQueueStopAndPurge
1121 //
1122 typedef
1124 WDFAPI
1125 VOID
1126 (STDCALL *PFN_WDFIOQUEUESTOPANDPURGE)(
1127  _In_
1129  _In_
1130  WDFQUEUE Queue,
1131  _When_(Context != 0, _In_)
1132  _When_(Context == 0, _In_opt_)
1137  );
1138 
1141 VOID
1142 WdfIoQueueStopAndPurge(
1143  _In_
1144  WDFQUEUE Queue,
1145  _When_(Context != 0, _In_)
1146  _When_(Context == 0, _In_opt_)
1151  )
1152 {
1154 }
1155 
1156 //
1157 // WDF Function: WdfIoQueueStopAndPurgeSynchronously
1158 //
1159 typedef
1161 WDFAPI
1162 VOID
1163 (STDCALL *PFN_WDFIOQUEUESTOPANDPURGESYNCHRONOUSLY)(
1164  _In_
1166  _In_
1167  WDFQUEUE Queue
1168  );
1169 
1172 VOID
1173 WdfIoQueueStopAndPurgeSynchronously(
1174  _In_
1175  WDFQUEUE Queue
1176  )
1177 {
1178  ((PFN_WDFIOQUEUESTOPANDPURGESYNCHRONOUSLY) WdfFunctions[WdfIoQueueStopAndPurgeSynchronouslyTableIndex])(WdfDriverGlobals, Queue);
1179 }
1180 
1181 
1182 
1183 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
1184 
1185 
1187 
1188 #endif // _WDFIO_H_
1189 
PFN_WDF_IO_QUEUE_IO_READ EvtIoRead
Definition: wdfio.h:401
EVT_WDF_IO_QUEUE_IO_WRITE * PFN_WDF_IO_QUEUE_IO_WRITE
Definition: wdfio.h:306
EVT_WDF_IO_QUEUE_IO_READ * PFN_WDF_IO_QUEUE_IO_READ
Definition: wdfio.h:289
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ PFN_WDF_IO_QUEUE_STATE QueueReady
Definition: wdfio.h:1065
_WDF_IO_QUEUE_DISPATCH_TYPE
Definition: wdfio.h:76
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_IO_QUEUE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES QueueAttributes
Definition: wdfio.h:613
#define _Must_inspect_result_
Definition: no_sal2.h:62
_Must_inspect_result_ _In_ WDFQUEUE _Out_ WDFREQUEST * OutRequest
Definition: wdfio.h:797
union _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS::@3664 Policy
BOOLEAN DefaultQueue
Definition: wdfio.h:397
PFN_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS EvtIoWdmIrpForForwardProgress
Definition: wdfio.h:521
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_IO_QUEUE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFQUEUE * Queue
Definition: wdfio.h:613
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST FoundRequest
Definition: wdfio.h:863
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
_In_ WDFQUEUE _In_opt_ PFN_WDF_IO_QUEUE_STATE StopComplete
Definition: wdfio.h:712
EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL * PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL
Definition: wdfio.h:327
WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY ForwardProgressReservedPolicy
Definition: wdfio.h:535
#define TRUE
Definition: types.h:120
EVT_WDF_IO_QUEUE_STATE * PFN_WDF_IO_QUEUE_STATE
Definition: wdfio.h:380
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2221
enum _WDF_TRI_STATE WDF_TRI_STATE
#define WDF_EXTERN_C_END
Definition: wdfio.h:42
PFN_WDF_IO_QUEUE_IO_RESUME EvtIoResume
Definition: wdfio.h:411
PFN_WDF_IO_ALLOCATE_REQUEST_RESOURCES EvtIoAllocateRequestResources
Definition: wdfio.h:550
LONG NTSTATUS
Definition: precomp.h:26
enum _WDF_IO_FORWARD_PROGRESS_ACTION WDF_IO_FORWARD_PROGRESS_ACTION
ULONG NumberOfPresentedRequests
Definition: wdfio.h:417
_In_ WDFCONTEXT Context
Definition: wdfio.h:378
_In_ WDFQUEUE _In_opt_ PFN_WDF_IO_QUEUE_STATE PurgeComplete
Definition: wdfio.h:1030
FORCEINLINE BOOLEAN WDF_IO_QUEUE_READY(_In_ WDF_IO_QUEUE_STATE State)
Definition: wdfio.h:160
struct _WDF_IO_QUEUE_CONFIG::@3662::@3663 Parallel
EVT_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL * PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL
Definition: wdfio.h:348
PFN_WDF_IO_QUEUE_IO_STOP EvtIoStop
Definition: wdfio.h:409
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
FORCEINLINE VOID WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(_Out_ PWDF_IO_QUEUE_CONFIG Config, _In_ WDF_IO_QUEUE_DISPATCH_TYPE DispatchType)
Definition: wdfio.h:443
#define WDF_EXTERN_C_START
Definition: wdfio.h:41
_In_ WDFQUEUE _Out_opt_ PULONG _Out_opt_ PULONG DriverRequests
Definition: wdfio.h:651
DriverGlobals
EVT_WDF_IO_QUEUE_IO_RESUME * PFN_WDF_IO_QUEUE_IO_RESUME
Definition: wdfio.h:272
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:318
EVT_WDF_IO_QUEUE_IO_STOP * PFN_WDF_IO_QUEUE_IO_STOP
Definition: wdfio.h:257
EVT_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE * PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE
Definition: wdfio.h:364
_In_ WDFQUEUE _In_opt_ PFN_WDF_IO_QUEUE_STATE StopAndPurgeComplete
Definition: wdfio.h:1133
struct _WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY
_Must_inspect_result_ _IRQL_requires_max_(DISPATCH_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFIOQUEUECREATE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
Definition: wdfio.h:606
_Must_inspect_result_ _In_ WDFQUEUE _In_ PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY ForwardProgressPolicy
Definition: wdfio.h:1100
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_IO_QUEUE_CONFIG Config
Definition: wdfio.h:613
FORCEINLINE VOID WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_PAGINGIO_INIT(_Out_ PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY Policy, _In_ ULONG TotalForwardProgressRequests)
Definition: wdfio.h:588
#define _In_opt_
Definition: no_sal2.h:212
FORCEINLINE BOOLEAN WDF_IO_QUEUE_STOPPED(_In_ WDF_IO_QUEUE_STATE State)
Definition: wdfio.h:176
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfio.h:613
#define WdfFunctions
Definition: wdf.h:66
WDF_IO_QUEUE_DISPATCH_TYPE DispatchType
Definition: wdfio.h:391
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:318
_In_ WDFREQUEST _In_ ULONG ActionFlags
Definition: wdfio.h:252
#define FALSE
Definition: types.h:117
_In_ PIRP Irp
Definition: csq.h:116
_In_ WDFQUEUE _Out_opt_ PULONG QueueRequests
Definition: wdfio.h:651
#define WDFAPI
Definition: wdftypes.h:53
union _WDF_IO_QUEUE_CONFIG::@3662 Settings
struct _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS::@3664::@3665 ExaminePolicy
unsigned char BOOLEAN
#define _Out_
Definition: no_sal2.h:160
_WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY
Definition: wdfio.h:465
_In_ WDFQUEUE _When_(Context !=0, _In_) _When_(Context
Definition: wdfio.h:710
#define _IRQL_requires_same_
Definition: driverspecs.h:215
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:547
WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS ForwardProgressReservePolicySettings
Definition: wdfio.h:540
#define _Out_opt_
Definition: no_sal2.h:214
PWDF_DRIVER_GLOBALS WdfDriverGlobals
PFN_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL EvtIoInternalDeviceControl
Definition: wdfio.h:407
#define STDCALL
Definition: wdf.h:45
FORCEINLINE BOOLEAN WDF_IO_QUEUE_DRAINED(_In_ WDF_IO_QUEUE_STATE State)
Definition: wdfio.h:194
WDF_EXTERN_C_START enum _WDF_IO_QUEUE_DISPATCH_TYPE WDF_IO_QUEUE_DISPATCH_TYPE
FORCEINLINE BOOLEAN WDF_IO_QUEUE_IDLE(_In_ WDF_IO_QUEUE_STATE State)
Definition: wdfio.h:146
enum _WDF_IO_QUEUE_STATE WDF_IO_QUEUE_STATE
WDFDRIVER Driver
Definition: wdfio.h:421
enum _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY
struct _WDF_IO_QUEUE_CONFIG * PWDF_IO_QUEUE_CONFIG
struct _WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS WDF_IO_FORWARD_PROGRESS_RESERVED_POLICY_SETTINGS
_WDF_IO_FORWARD_PROGRESS_ACTION
Definition: wdfio.h:459
FORCEINLINE BOOLEAN WDF_IO_QUEUE_PURGED(_In_ WDF_IO_QUEUE_STATE State)
Definition: wdfio.h:212
#define NTSTATUS
Definition: precomp.h:20
#define VOID
Definition: acefi.h:82
_In_ WDFREQUEST _In_ size_t _In_ size_t _In_ ULONG IoControlCode
Definition: wdfio.h:318
PFN_WDF_IO_ALLOCATE_RESOURCES_FOR_RESERVED_REQUEST EvtIoAllocateResourcesForReservedRequest
Definition: wdfio.h:545
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
struct _WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY * PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
EVT_WDF_IO_QUEUE_IO_DEFAULT * PFN_WDF_IO_QUEUE_IO_DEFAULT
Definition: wdfio.h:239
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:474
EVT_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS * PFN_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS
Definition: wdfio.h:515
EVT_WDF_IO_ALLOCATE_REQUEST_RESOURCES * PFN_WDF_IO_ALLOCATE_REQUEST_RESOURCES
Definition: wdfio.h:500
typedef _Function_class_(EVT_WDF_IO_QUEUE_IO_DEFAULT) _IRQL_requires_same_ _IRQL_requires_max_(DISPATCH_LEVEL) VOID STDCALL EVT_WDF_IO_QUEUE_IO_DEFAULT(_In_ WDFQUEUE Queue
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define _In_
Definition: no_sal2.h:158
PFN_WDF_IO_QUEUE_IO_DEVICE_CONTROL EvtIoDeviceControl
Definition: wdfio.h:405
PFN_WDF_IO_QUEUE_IO_DEFAULT EvtIoDefault
Definition: wdfio.h:399
_Must_inspect_result_ _In_ WDFQUEUE _In_ WDFFILEOBJECT FileObject
Definition: wdfio.h:828
WDF_TRI_STATE PowerManaged
Definition: wdfio.h:393
PFN_WDF_IO_QUEUE_IO_WRITE EvtIoWrite
Definition: wdfio.h:403
BOOLEAN AllowZeroLengthRequests
Definition: wdfio.h:395
#define FORCEINLINE
Definition: wdftypes.h:67
unsigned int * PULONG
Definition: retypes.h:1
FORCEINLINE VOID WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_DEFAULT_INIT(_Out_ PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY Policy, _In_ ULONG TotalForwardProgressRequests)
Definition: wdfio.h:556
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
FORCEINLINE VOID WDF_IO_QUEUE_CONFIG_INIT(_Out_ PWDF_IO_QUEUE_CONFIG Config, _In_ WDF_IO_QUEUE_DISPATCH_TYPE DispatchType)
Definition: wdfio.h:426
_In_ WDFQUEUE _In_opt_ PFN_WDF_IO_QUEUE_STATE DrainComplete
Definition: wdfio.h:968
_WDF_IO_QUEUE_STATE
Definition: wdfio.h:124
struct _WDF_IO_QUEUE_CONFIG WDF_IO_QUEUE_CONFIG
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY Policy
Definition: wdfinterrupt.h:651
PFN_WDF_IO_QUEUE_IO_CANCELED_ON_QUEUE EvtIoCanceledOnQueue
Definition: wdfio.h:413
FORCEINLINE VOID WDF_IO_QUEUE_FORWARD_PROGRESS_POLICY_EXAMINE_INIT(_Out_ PWDF_IO_QUEUE_FORWARD_PROGRESS_POLICY Policy, _In_ ULONG TotalForwardProgressRequests, _In_ PFN_WDF_IO_WDM_IRP_FOR_FORWARD_PROGRESS EvtIoWdmIrpForForwardProgress)
Definition: wdfio.h:571
EVT_WDF_IO_ALLOCATE_RESOURCES_FOR_RESERVED_REQUEST * PFN_WDF_IO_ALLOCATE_RESOURCES_FOR_RESERVED_REQUEST
Definition: wdfio.h:485
#define _Inout_opt_
Definition: no_sal2.h:216