ReactOS  0.4.15-dev-3182-g7b62228
wdfiotarget.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  wdfiotarget.h
10 
11 Abstract:
12 
13  Interfaces for WDF IO Targets
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 _WDFIOTARGET_H_
30 #define _WDFIOTARGET_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 
49 #if (NTDDI_VERSION >= NTDDI_WIN2K)
50 
51 typedef enum _WDF_IO_TARGET_STATE {
60 
68 
75 
81 
82 
83 
84 typedef
85 _Function_class_(EVT_WDF_IO_TARGET_QUERY_REMOVE)
89 STDCALL
90 EVT_WDF_IO_TARGET_QUERY_REMOVE(
91  _In_
92  WDFIOTARGET IoTarget
93  );
94 
95 typedef EVT_WDF_IO_TARGET_QUERY_REMOVE *PFN_WDF_IO_TARGET_QUERY_REMOVE;
96 
97 typedef
98 _Function_class_(EVT_WDF_IO_TARGET_REMOVE_CANCELED)
101 VOID
102 STDCALL
103 EVT_WDF_IO_TARGET_REMOVE_CANCELED(
104  _In_
105  WDFIOTARGET IoTarget
106  );
107 
108 typedef EVT_WDF_IO_TARGET_REMOVE_CANCELED *PFN_WDF_IO_TARGET_REMOVE_CANCELED;
109 
110 typedef
111 _Function_class_(EVT_WDF_IO_TARGET_REMOVE_COMPLETE)
114 VOID
115 STDCALL
116 EVT_WDF_IO_TARGET_REMOVE_COMPLETE(
117  _In_
118  WDFIOTARGET IoTarget
119  );
120 
121 typedef EVT_WDF_IO_TARGET_REMOVE_COMPLETE *PFN_WDF_IO_TARGET_REMOVE_COMPLETE;
122 
124  //
125  // Size of this structure in bytes
126  //
128 
129  //
130  // Indicates which fields of this structure are going to be used in
131  // creating the WDFIOTARGET.
132  //
134 
135  //
136  // Notification when the target is being queried for removal.
137  // If !NT_SUCCESS is returned, the query will fail and the target will
138  // remain opened.
139  //
141 
142  //
143  // The previous query remove has been canceled and the target can now be
144  // reopened.
145  //
147 
148  //
149  // The query remove has succeeded and the target is now removed from the
150  // system.
151  //
153 
154 
155  // <KMDF_ONLY/>
156  // ========== WdfIoTargetOpenUseExistingDevice begin ==========
157  //
158  // The device object to send requests to
159  //
161 
162  // <KMDF_ONLY/>
163  // File object representing the TargetDeviceObject. The PFILE_OBJECT will
164  // be passed as a parameter in all requests sent to the resulting
165  // WDFIOTARGET.
166  //
168 
169  // ========== WdfIoTargetOpenUseExistingDevice end ==========
170 
171  // ========== WdfIoTargetOpenByName begin ==========
172  //
173  // Name of the device to open.
174  //
176 
177  // <KMDF_DOC>
178  // The access desired on the device being opened up, ie WDM FILE_XXX_ACCESS
179  // such as FILE_ANY_ACCESS, FILE_SPECIAL_ACCESS, FILE_READ_ACCESS, or
180  // FILE_WRITE_ACCESS or you can use values such as GENERIC_READ,
181  // GENERIC_WRITE, or GENERIC_ALL.
182  // </KMDF_DOC>
183  // <UMDF_DOC>
184  // The requested access to the file or device, which can be summarized as
185  // read, write, both or neither zero). For more information about
186  // this member, see the dwDesiredAccess parameter of CreateFile in the
187  // Windows SDK. Note that ACCESS_MASK data type is a DWORD value.
188  // </UMDF_DOC>
189  //
191 
192  //
193  // <KMDF_DOC>
194  // Share access desired on the target being opened, ie WDM FILE_SHARE_XXX
195  // values such as FILE_SHARE_READ, FILE_SHARE_WRITE, FILE_SHARE_DELETE.
196  // A zero value means exclusive access to the target.
197  //
198  // </KMDF_DOC>
199  // <UMDF_DOC>
200  // The type of sharing to allow for the file. For more information about
201  // this member, see the dwShareMode parameter of CreateFile in the
202  // Windows SDK. A value of 0 means exclusive access.
203  // </UMDF_DOC>
204  //
206 
207  //
208  // <KMDF_DOC>
209  // File attributes, see ZwCreateFile in the DDK for a list of valid
210  // values and their meaning.
211  // </KMDF_DOC>
212  // <UMDF_DOC>
213  // Additional flags and attributes for the file. For more information about
214  // this member, see the dwFlagsAndAttributes parameter of CreateFile
215  // in the Windows SDK.
216  // </UMDF_DOC>
217  //
219 
220  //
221  // <KMDF_DOC>
222  // Create disposition, see ZwCreateFile in the DDK for a list of valid
223  // values and their meaning.
224  // </KMDF_DOC>
225  // <UMDF_DOC>
226  // The action to take if the file already exists. For more information
227  // about this member, see the dwCreationDisposition parameter of
228  // CreateFile in the Windows SDK.
229  // </UMDF_DOC>
230  //
232 
233  //
234  // <KMDF_ONLY/>
235  // Options for opening the device, see CreateOptions for ZwCreateFile in the
236  // DDK for a list of valid values and their meaning.
237  //
239 
240  //
241  // <KMDF_ONLY/>
242  //
244 
245  //
246  // <KMDF_ONLY/>
247  //
249 
250  //
251  // <KMDF_ONLY/>
252  //
254 
255  // ========== WdfIoTargetOpenByName end ==========
256 
257  //
258  // <KMDF_ONLY/>
259  //
260  // On return for a create by name, this will contain one of the following
261  // values: FILE_CREATED, FILE_OPENED, FILE_OVERWRITTEN, FILE_SUPERSEDED,
262  // FILE_EXISTS, FILE_DOES_NOT_EXIST
263  //
265 
266  // ========== WdfIoTargetOpenLocalTargetByFile begin ==========
267 
268  //
269  // <UMDF_ONLY/> A UNICODE_STRING-formatted string that contains the
270  // name of the file to create a file object from. This parameter is
271  // optional, and is applicable only when Type parameter is
272  // WdfIoTargetOpenLocalTargetByFile. The driver can leave this member
273  // unchanged if the driver does not have to create the file object
274  // from a file name. If the driver must supply a name, the string that
275  // the driver passes must not contain any path separator characters
276  // ("/" or "\").
277  //
279 
280  // ========== WdfIoTargetOpenLocalTargetByFile end ==========
281 
283 
284 
286 VOID
290  )
291 {
293 
294  Params->Size = sizeof(WDF_IO_TARGET_OPEN_PARAMS);
296 
297  Params->TargetDeviceObject = DeviceObject;
298 }
299 
300 
302 VOID
305  _In_ PCUNICODE_STRING TargetDeviceName,
307  )
308 {
310 
311  Params->Size = sizeof(WDF_IO_TARGET_OPEN_PARAMS);
313 
314  RtlCopyMemory(&Params->TargetDeviceName,
315  TargetDeviceName,
316  sizeof(UNICODE_STRING));
317  Params->DesiredAccess = DesiredAccess;
318  Params->CreateOptions = FILE_NON_DIRECTORY_FILE;
319 }
320 
322 VOID
325  _In_ PCUNICODE_STRING TargetDeviceName,
327  )
328 {
330  TargetDeviceName,
331  DesiredAccess);
332  Params->CreateDisposition = FILE_OPEN;
333 }
334 
335 
336 
337 
339 VOID
342  )
343 {
345 
346  Params->Size = sizeof(WDF_IO_TARGET_OPEN_PARAMS);
348 }
349 
350 
351 //
352 // WDF Function: WdfIoTargetCreate
353 //
354 typedef
357 WDFAPI
358 NTSTATUS
359 (STDCALL *PFN_WDFIOTARGETCREATE)(
360  _In_
362  _In_
363  WDFDEVICE Device,
364  _In_opt_
366  _Out_
367  WDFIOTARGET* IoTarget
368  );
369 
373 NTSTATUS
374 WdfIoTargetCreate(
375  _In_
376  WDFDEVICE Device,
377  _In_opt_
379  _Out_
380  WDFIOTARGET* IoTarget
381  )
382 {
384 }
385 
386 //
387 // WDF Function: WdfIoTargetOpen
388 //
389 typedef
392 WDFAPI
393 NTSTATUS
394 (STDCALL *PFN_WDFIOTARGETOPEN)(
395  _In_
397  _In_
398  WDFIOTARGET IoTarget,
399  _In_
401  );
402 
406 NTSTATUS
407 WdfIoTargetOpen(
408  _In_
409  WDFIOTARGET IoTarget,
410  _In_
412  )
413 {
415 }
416 
417 //
418 // WDF Function: WdfIoTargetCloseForQueryRemove
419 //
420 typedef
422 WDFAPI
423 VOID
424 (STDCALL *PFN_WDFIOTARGETCLOSEFORQUERYREMOVE)(
425  _In_
427  _In_
428  WDFIOTARGET IoTarget
429  );
430 
433 VOID
434 WdfIoTargetCloseForQueryRemove(
435  _In_
436  WDFIOTARGET IoTarget
437  )
438 {
439  ((PFN_WDFIOTARGETCLOSEFORQUERYREMOVE) WdfFunctions[WdfIoTargetCloseForQueryRemoveTableIndex])(WdfDriverGlobals, IoTarget);
440 }
441 
442 //
443 // WDF Function: WdfIoTargetClose
444 //
445 typedef
447 WDFAPI
448 VOID
449 (STDCALL *PFN_WDFIOTARGETCLOSE)(
450  _In_
452  _In_
453  WDFIOTARGET IoTarget
454  );
455 
458 VOID
459 WdfIoTargetClose(
460  _In_
461  WDFIOTARGET IoTarget
462  )
463 {
465 }
466 
467 //
468 // WDF Function: WdfIoTargetStart
469 //
470 typedef
473 WDFAPI
474 NTSTATUS
475 (STDCALL *PFN_WDFIOTARGETSTART)(
476  _In_
478  _In_
479  WDFIOTARGET IoTarget
480  );
481 
485 NTSTATUS
486 WdfIoTargetStart(
487  _In_
488  WDFIOTARGET IoTarget
489  )
490 {
491  return ((PFN_WDFIOTARGETSTART) WdfFunctions[WdfIoTargetStartTableIndex])(WdfDriverGlobals, IoTarget);
492 }
493 
494 //
495 // WDF Function: WdfIoTargetStop
496 //
497 typedef
500 WDFAPI
501 VOID
502 (STDCALL *PFN_WDFIOTARGETSTOP)(
503  _In_
505  _In_
506  WDFIOTARGET IoTarget,
507  _In_
510  );
511 
515 VOID
516 WdfIoTargetStop(
517  _In_
518  WDFIOTARGET IoTarget,
519  _In_
522  )
523 {
525 }
526 
527 //
528 // WDF Function: WdfIoTargetPurge
529 //
530 typedef
533 WDFAPI
534 VOID
535 (STDCALL *PFN_WDFIOTARGETPURGE)(
536  _In_
538  _In_
539  WDFIOTARGET IoTarget,
540  _In_
543  );
544 
548 VOID
549 WdfIoTargetPurge(
550  _In_
551  WDFIOTARGET IoTarget,
552  _In_
555  )
556 {
558 }
559 
560 //
561 // WDF Function: WdfIoTargetGetState
562 //
563 typedef
565 WDFAPI
567 (STDCALL *PFN_WDFIOTARGETGETSTATE)(
568  _In_
570  _In_
571  WDFIOTARGET IoTarget
572  );
573 
577 WdfIoTargetGetState(
578  _In_
579  WDFIOTARGET IoTarget
580  )
581 {
582  return ((PFN_WDFIOTARGETGETSTATE) WdfFunctions[WdfIoTargetGetStateTableIndex])(WdfDriverGlobals, IoTarget);
583 }
584 
585 //
586 // WDF Function: WdfIoTargetGetDevice
587 //
588 typedef
590 WDFAPI
591 WDFDEVICE
592 (STDCALL *PFN_WDFIOTARGETGETDEVICE)(
593  _In_
595  _In_
596  WDFIOTARGET IoTarget
597  );
598 
601 WDFDEVICE
602 WdfIoTargetGetDevice(
603  _In_
604  WDFIOTARGET IoTarget
605  )
606 {
607  return ((PFN_WDFIOTARGETGETDEVICE) WdfFunctions[WdfIoTargetGetDeviceTableIndex])(WdfDriverGlobals, IoTarget);
608 }
609 
610 //
611 // WDF Function: WdfIoTargetQueryTargetProperty
612 //
613 typedef
616 WDFAPI
617 NTSTATUS
618 (STDCALL *PFN_WDFIOTARGETQUERYTARGETPROPERTY)(
619  _In_
621  _In_
622  WDFIOTARGET IoTarget,
623  _In_
625  _In_
632  );
633 
637 NTSTATUS
638 WdfIoTargetQueryTargetProperty(
639  _In_
640  WDFIOTARGET IoTarget,
641  _In_
643  _In_
650  )
651 {
653 }
654 
655 //
656 // WDF Function: WdfIoTargetAllocAndQueryTargetProperty
657 //
658 typedef
661 WDFAPI
662 NTSTATUS
663 (STDCALL *PFN_WDFIOTARGETALLOCANDQUERYTARGETPROPERTY)(
664  _In_
666  _In_
667  WDFIOTARGET IoTarget,
668  _In_
670  _In_
673  _In_opt_
675  _Out_
676  WDFMEMORY* PropertyMemory
677  );
678 
682 NTSTATUS
683 WdfIoTargetAllocAndQueryTargetProperty(
684  _In_
685  WDFIOTARGET IoTarget,
686  _In_
688  _In_
691  _In_opt_
693  _Out_
694  WDFMEMORY* PropertyMemory
695  )
696 {
698 }
699 
700 //
701 // WDF Function: WdfIoTargetQueryForInterface
702 //
703 typedef
706 WDFAPI
707 NTSTATUS
708 (STDCALL *PFN_WDFIOTARGETQUERYFORINTERFACE)(
709  _In_
711  _In_
712  WDFIOTARGET IoTarget,
713  _In_
715  _Out_
717  _In_
718  USHORT Size,
719  _In_
720  USHORT Version,
721  _In_opt_
723  );
724 
728 NTSTATUS
729 WdfIoTargetQueryForInterface(
730  _In_
731  WDFIOTARGET IoTarget,
732  _In_
734  _Out_
736  _In_
737  USHORT Size,
738  _In_
739  USHORT Version,
740  _In_opt_
742  )
743 {
745 }
746 
747 //
748 // WDF Function: WdfIoTargetWdmGetTargetDeviceObject
749 //
750 typedef
752 WDFAPI
754 (STDCALL *PFN_WDFIOTARGETWDMGETTARGETDEVICEOBJECT)(
755  _In_
757  _In_
758  WDFIOTARGET IoTarget
759  );
760 
764 WdfIoTargetWdmGetTargetDeviceObject(
765  _In_
766  WDFIOTARGET IoTarget
767  )
768 {
769  return ((PFN_WDFIOTARGETWDMGETTARGETDEVICEOBJECT) WdfFunctions[WdfIoTargetWdmGetTargetDeviceObjectTableIndex])(WdfDriverGlobals, IoTarget);
770 }
771 
772 //
773 // WDF Function: WdfIoTargetWdmGetTargetPhysicalDevice
774 //
775 typedef
777 WDFAPI
779 (STDCALL *PFN_WDFIOTARGETWDMGETTARGETPHYSICALDEVICE)(
780  _In_
782  _In_
783  WDFIOTARGET IoTarget
784  );
785 
789 WdfIoTargetWdmGetTargetPhysicalDevice(
790  _In_
791  WDFIOTARGET IoTarget
792  )
793 {
794  return ((PFN_WDFIOTARGETWDMGETTARGETPHYSICALDEVICE) WdfFunctions[WdfIoTargetWdmGetTargetPhysicalDeviceTableIndex])(WdfDriverGlobals, IoTarget);
795 }
796 
797 //
798 // WDF Function: WdfIoTargetWdmGetTargetFileObject
799 //
800 typedef
802 WDFAPI
804 (STDCALL *PFN_WDFIOTARGETWDMGETTARGETFILEOBJECT)(
805  _In_
807  _In_
808  WDFIOTARGET IoTarget
809  );
810 
814 WdfIoTargetWdmGetTargetFileObject(
815  _In_
816  WDFIOTARGET IoTarget
817  )
818 {
819  return ((PFN_WDFIOTARGETWDMGETTARGETFILEOBJECT) WdfFunctions[WdfIoTargetWdmGetTargetFileObjectTableIndex])(WdfDriverGlobals, IoTarget);
820 }
821 
822 //
823 // WDF Function: WdfIoTargetWdmGetTargetFileHandle
824 //
825 typedef
827 WDFAPI
828 HANDLE
829 (STDCALL *PFN_WDFIOTARGETWDMGETTARGETFILEHANDLE)(
830  _In_
832  _In_
833  WDFIOTARGET IoTarget
834  );
835 
838 HANDLE
839 WdfIoTargetWdmGetTargetFileHandle(
840  _In_
841  WDFIOTARGET IoTarget
842  )
843 {
844  return ((PFN_WDFIOTARGETWDMGETTARGETFILEHANDLE) WdfFunctions[WdfIoTargetWdmGetTargetFileHandleTableIndex])(WdfDriverGlobals, IoTarget);
845 }
846 
847 //
848 // WDF Function: WdfIoTargetSendReadSynchronously
849 //
850 typedef
853 WDFAPI
854 NTSTATUS
855 (STDCALL *PFN_WDFIOTARGETSENDREADSYNCHRONOUSLY)(
856  _In_
858  _In_
859  WDFIOTARGET IoTarget,
860  _In_opt_
861  WDFREQUEST Request,
862  _In_opt_
864  _In_opt_
866  _In_opt_
868  _Out_opt_
870  );
871 
875 NTSTATUS
876 WdfIoTargetSendReadSynchronously(
877  _In_
878  WDFIOTARGET IoTarget,
879  _In_opt_
880  WDFREQUEST Request,
881  _In_opt_
883  _In_opt_
885  _In_opt_
887  _Out_opt_
889  )
890 {
892 }
893 
894 //
895 // WDF Function: WdfIoTargetFormatRequestForRead
896 //
897 typedef
900 WDFAPI
901 NTSTATUS
902 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORREAD)(
903  _In_
905  _In_
906  WDFIOTARGET IoTarget,
907  _In_
908  WDFREQUEST Request,
909  _In_opt_
910  WDFMEMORY OutputBuffer,
911  _In_opt_
913  _In_opt_
915  );
916 
920 NTSTATUS
921 WdfIoTargetFormatRequestForRead(
922  _In_
923  WDFIOTARGET IoTarget,
924  _In_
925  WDFREQUEST Request,
926  _In_opt_
927  WDFMEMORY OutputBuffer,
928  _In_opt_
930  _In_opt_
932  )
933 {
935 }
936 
937 //
938 // WDF Function: WdfIoTargetSendWriteSynchronously
939 //
940 typedef
943 WDFAPI
944 NTSTATUS
945 (STDCALL *PFN_WDFIOTARGETSENDWRITESYNCHRONOUSLY)(
946  _In_
948  _In_
949  WDFIOTARGET IoTarget,
950  _In_opt_
951  WDFREQUEST Request,
952  _In_opt_
954  _In_opt_
956  _In_opt_
958  _Out_opt_
960  );
961 
965 NTSTATUS
966 WdfIoTargetSendWriteSynchronously(
967  _In_
968  WDFIOTARGET IoTarget,
969  _In_opt_
970  WDFREQUEST Request,
971  _In_opt_
973  _In_opt_
975  _In_opt_
977  _Out_opt_
979  )
980 {
982 }
983 
984 //
985 // WDF Function: WdfIoTargetFormatRequestForWrite
986 //
987 typedef
990 WDFAPI
991 NTSTATUS
992 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORWRITE)(
993  _In_
995  _In_
996  WDFIOTARGET IoTarget,
997  _In_
998  WDFREQUEST Request,
999  _In_opt_
1000  WDFMEMORY InputBuffer,
1001  _In_opt_
1003  _In_opt_
1005  );
1006 
1010 NTSTATUS
1011 WdfIoTargetFormatRequestForWrite(
1012  _In_
1013  WDFIOTARGET IoTarget,
1014  _In_
1015  WDFREQUEST Request,
1016  _In_opt_
1017  WDFMEMORY InputBuffer,
1018  _In_opt_
1020  _In_opt_
1022  )
1023 {
1025 }
1026 
1027 //
1028 // WDF Function: WdfIoTargetSendIoctlSynchronously
1029 //
1030 typedef
1033 WDFAPI
1034 NTSTATUS
1035 (STDCALL *PFN_WDFIOTARGETSENDIOCTLSYNCHRONOUSLY)(
1036  _In_
1038  _In_
1039  WDFIOTARGET IoTarget,
1040  _In_opt_
1041  WDFREQUEST Request,
1042  _In_
1043  ULONG IoctlCode,
1044  _In_opt_
1046  _In_opt_
1048  _In_opt_
1050  _Out_opt_
1052  );
1053 
1057 NTSTATUS
1058 WdfIoTargetSendIoctlSynchronously(
1059  _In_
1060  WDFIOTARGET IoTarget,
1061  _In_opt_
1062  WDFREQUEST Request,
1063  _In_
1064  ULONG IoctlCode,
1065  _In_opt_
1067  _In_opt_
1069  _In_opt_
1071  _Out_opt_
1073  )
1074 {
1076 }
1077 
1078 //
1079 // WDF Function: WdfIoTargetFormatRequestForIoctl
1080 //
1081 typedef
1084 WDFAPI
1085 NTSTATUS
1086 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORIOCTL)(
1087  _In_
1089  _In_
1090  WDFIOTARGET IoTarget,
1091  _In_
1092  WDFREQUEST Request,
1093  _In_
1094  ULONG IoctlCode,
1095  _In_opt_
1096  WDFMEMORY InputBuffer,
1097  _In_opt_
1099  _In_opt_
1100  WDFMEMORY OutputBuffer,
1101  _In_opt_
1103  );
1104 
1108 NTSTATUS
1109 WdfIoTargetFormatRequestForIoctl(
1110  _In_
1111  WDFIOTARGET IoTarget,
1112  _In_
1113  WDFREQUEST Request,
1114  _In_
1115  ULONG IoctlCode,
1116  _In_opt_
1117  WDFMEMORY InputBuffer,
1118  _In_opt_
1120  _In_opt_
1121  WDFMEMORY OutputBuffer,
1122  _In_opt_
1124  )
1125 {
1127 }
1128 
1129 //
1130 // WDF Function: WdfIoTargetSendInternalIoctlSynchronously
1131 //
1132 typedef
1135 WDFAPI
1136 NTSTATUS
1137 (STDCALL *PFN_WDFIOTARGETSENDINTERNALIOCTLSYNCHRONOUSLY)(
1138  _In_
1140  _In_
1141  WDFIOTARGET IoTarget,
1142  _In_opt_
1143  WDFREQUEST Request,
1144  _In_
1145  ULONG IoctlCode,
1146  _In_opt_
1148  _In_opt_
1150  _In_opt_
1152  _Out_opt_
1154  );
1155 
1159 NTSTATUS
1160 WdfIoTargetSendInternalIoctlSynchronously(
1161  _In_
1162  WDFIOTARGET IoTarget,
1163  _In_opt_
1164  WDFREQUEST Request,
1165  _In_
1166  ULONG IoctlCode,
1167  _In_opt_
1169  _In_opt_
1171  _In_opt_
1173  _Out_opt_
1175  )
1176 {
1178 }
1179 
1180 //
1181 // WDF Function: WdfIoTargetFormatRequestForInternalIoctl
1182 //
1183 typedef
1186 WDFAPI
1187 NTSTATUS
1188 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTL)(
1189  _In_
1191  _In_
1192  WDFIOTARGET IoTarget,
1193  _In_
1194  WDFREQUEST Request,
1195  _In_
1196  ULONG IoctlCode,
1197  _In_opt_
1198  WDFMEMORY InputBuffer,
1199  _In_opt_
1201  _In_opt_
1202  WDFMEMORY OutputBuffer,
1203  _In_opt_
1205  );
1206 
1210 NTSTATUS
1211 WdfIoTargetFormatRequestForInternalIoctl(
1212  _In_
1213  WDFIOTARGET IoTarget,
1214  _In_
1215  WDFREQUEST Request,
1216  _In_
1217  ULONG IoctlCode,
1218  _In_opt_
1219  WDFMEMORY InputBuffer,
1220  _In_opt_
1222  _In_opt_
1223  WDFMEMORY OutputBuffer,
1224  _In_opt_
1226  )
1227 {
1229 }
1230 
1231 //
1232 // WDF Function: WdfIoTargetSendInternalIoctlOthersSynchronously
1233 //
1234 typedef
1237 WDFAPI
1238 NTSTATUS
1239 (STDCALL *PFN_WDFIOTARGETSENDINTERNALIOCTLOTHERSSYNCHRONOUSLY)(
1240  _In_
1242  _In_
1243  WDFIOTARGET IoTarget,
1244  _In_opt_
1245  WDFREQUEST Request,
1246  _In_
1247  ULONG IoctlCode,
1248  _In_opt_
1250  _In_opt_
1252  _In_opt_
1254  _In_opt_
1256  _Out_opt_
1258  );
1259 
1263 NTSTATUS
1264 WdfIoTargetSendInternalIoctlOthersSynchronously(
1265  _In_
1266  WDFIOTARGET IoTarget,
1267  _In_opt_
1268  WDFREQUEST Request,
1269  _In_
1270  ULONG IoctlCode,
1271  _In_opt_
1273  _In_opt_
1275  _In_opt_
1277  _In_opt_
1279  _Out_opt_
1281  )
1282 {
1284 }
1285 
1286 //
1287 // WDF Function: WdfIoTargetFormatRequestForInternalIoctlOthers
1288 //
1289 typedef
1292 WDFAPI
1293 NTSTATUS
1294 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTLOTHERS)(
1295  _In_
1297  _In_
1298  WDFIOTARGET IoTarget,
1299  _In_
1300  WDFREQUEST Request,
1301  _In_
1302  ULONG IoctlCode,
1303  _In_opt_
1304  WDFMEMORY OtherArg1,
1305  _In_opt_
1307  _In_opt_
1308  WDFMEMORY OtherArg2,
1309  _In_opt_
1311  _In_opt_
1312  WDFMEMORY OtherArg4,
1313  _In_opt_
1315  );
1316 
1320 NTSTATUS
1321 WdfIoTargetFormatRequestForInternalIoctlOthers(
1322  _In_
1323  WDFIOTARGET IoTarget,
1324  _In_
1325  WDFREQUEST Request,
1326  _In_
1327  ULONG IoctlCode,
1328  _In_opt_
1329  WDFMEMORY OtherArg1,
1330  _In_opt_
1332  _In_opt_
1333  WDFMEMORY OtherArg2,
1334  _In_opt_
1336  _In_opt_
1337  WDFMEMORY OtherArg4,
1338  _In_opt_
1340  )
1341 {
1343 }
1344 
1345 
1346 
1347 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
1348 
1349 
1350 
1352 
1353 #endif // _WDFIOTARGET_H_
1354 
_Must_inspect_result_ _In_ WDFIOTARGET _In_ WDFREQUEST _In_ ULONG _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET OtherArg4Offset
Definition: wdfiotarget.h:1298
PFN_WDF_IO_TARGET_QUERY_REMOVE EvtIoTargetQueryRemove
Definition: wdfiotarget.h:140
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
Definition: wdfiotarget.h:949
DEVICE_REGISTRY_PROPERTY
Definition: iotypes.h:1194
enum _WDF_IO_TARGET_PURGE_IO_ACTION WDF_IO_TARGET_PURGE_IO_ACTION
_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
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2654
FORCEINLINE VOID WDF_IO_TARGET_OPEN_PARAMS_INIT_EXISTING_DEVICE(_Out_ PWDF_IO_TARGET_OPEN_PARAMS Params, _In_ PDEVICE_OBJECT DeviceObject)
Definition: wdfiotarget.h:287
#define _In_opt_
Definition: ms_sal.h:309
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:306
#define _Out_
Definition: ms_sal.h:345
_WDF_IO_TARGET_STATE
Definition: wdfiotarget.h:51
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR OtherArg2
Definition: wdfiotarget.h:1243
PFN_WDF_IO_TARGET_REMOVE_COMPLETE EvtIoTargetRemoveComplete
Definition: wdfiotarget.h:152
struct _DEVICE_OBJECT * PDEVICE_OBJECT
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG DeviceOffset
Definition: wdfiotarget.h:859
_Must_inspect_result_ _In_ WDFIOTARGET _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdfiotarget.h:712
_WDF_IO_TARGET_PURGE_IO_ACTION
Definition: wdfiotarget.h:76
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
Definition: wdfdevice.h:3767
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES IoTargetAttributes
Definition: wdfiotarget.h:363
PFN_WDF_IO_TARGET_REMOVE_CANCELED EvtIoTargetRemoveCanceled
Definition: wdfiotarget.h:146
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_opt_ PVOID PropertyBuffer
Definition: wdfiotarget.h:629
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfiotarget.h:622
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
_Must_inspect_result_ _In_ WDFIOTARGET _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT Size
Definition: wdfiotarget.h:712
_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
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
_Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFIOTARGETCREATE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
Definition: wdfiotarget.h:356
DriverGlobals
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG IoctlCode
Definition: wdfiotarget.h:1039
FORCEINLINE VOID WDF_IO_TARGET_OPEN_PARAMS_INIT_CREATE_BY_NAME(_Out_ PWDF_IO_TARGET_OPEN_PARAMS Params, _In_ PCUNICODE_STRING TargetDeviceName, _In_ ACCESS_MASK DesiredAccess)
Definition: wdfiotarget.h:303
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
Definition: wdfiotarget.h:1039
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
Definition: wdfiotarget.h:859
struct _WDF_IO_TARGET_OPEN_PARAMS * PWDF_IO_TARGET_OPEN_PARAMS
#define WdfFunctions
Definition: wdf.h:66
enum _WDF_IO_TARGET_OPEN_TYPE WDF_IO_TARGET_OPEN_TYPE
enum _WDF_IO_TARGET_SENT_IO_ACTION WDF_IO_TARGET_SENT_IO_ACTION
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:382
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
EVT_WDF_IO_TARGET_REMOVE_CANCELED * PFN_WDF_IO_TARGET_REMOVE_CANCELED
Definition: wdfiotarget.h:108
#define WDFAPI
Definition: wdftypes.h:53
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFMEMORY * PropertyMemory
Definition: wdfiotarget.h:667
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR OtherArg4
Definition: wdfiotarget.h:1243
_Must_inspect_result_ _In_ WDFIOTARGET _In_ WDFREQUEST _In_ ULONG _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET OtherArg2Offset
Definition: wdfiotarget.h:1298
_WDF_IO_TARGET_OPEN_TYPE
Definition: wdfiotarget.h:61
#define _In_
Definition: ms_sal.h:308
#define _IRQL_requires_same_
Definition: driverspecs.h:232
PDEVICE_OBJECT TargetDeviceObject
Definition: wdfiotarget.h:160
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:859
WDF_IO_TARGET_OPEN_TYPE Type
Definition: wdfiotarget.h:133
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfiotarget.h:363
UNICODE_STRING TargetDeviceName
Definition: wdfiotarget.h:175
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:949
struct _WDF_IO_TARGET_OPEN_PARAMS WDF_IO_TARGET_OPEN_PARAMS
#define STDCALL
Definition: wdf.h:45
_Must_inspect_result_ _In_ WDFIOTARGET _In_ WDFREQUEST _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET OutputBufferOffset
Definition: wdfiotarget.h:906
EVT_WDF_IO_TARGET_REMOVE_COMPLETE * PFN_WDF_IO_TARGET_REMOVE_COMPLETE
Definition: wdfiotarget.h:121
WDF_EXTERN_C_START enum _WDF_IO_TARGET_STATE WDF_IO_TARGET_STATE
INT POOL_TYPE
Definition: typedefs.h:78
PVOID HANDLE
Definition: typedefs.h:73
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:361
FORCEINLINE VOID WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_NAME(_Out_ PWDF_IO_TARGET_OPEN_PARAMS Params, _In_ PCUNICODE_STRING TargetDeviceName, _In_ ACCESS_MASK DesiredAccess)
Definition: wdfiotarget.h:323
* PFILE_OBJECT
Definition: iotypes.h:1998
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR OtherArg1
Definition: wdfiotarget.h:1243
FORCEINLINE VOID WDF_IO_TARGET_OPEN_PARAMS_INIT_REOPEN(_Out_ PWDF_IO_TARGET_OPEN_PARAMS Params)
Definition: wdfiotarget.h:340
_Must_inspect_result_ _In_ WDFIOTARGET _In_ PWDF_IO_TARGET_OPEN_PARAMS OpenParams
Definition: wdfiotarget.h:398
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes
Definition: wdfiotarget.h:667
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_opt_ PVOID _Deref_out_range_(<=, BufferLength) PULONG ResultLength)
Definition: wdfiotarget.h:630
typedef _Function_class_(EVT_WDF_IO_TARGET_QUERY_REMOVE) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_IO_TARGET_QUERY_REMOVE(_In_ WDFIOTARGET IoTarget)
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST Request
Definition: wdfiotarget.h:859
#define _Strict_type_match_
Definition: ms_sal.h:2954
#define NTSTATUS
Definition: precomp.h:20
#define VOID
Definition: acefi.h:82
#define FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID PropertyBuffer
Definition: wdfdevice.h:4431
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfiotarget.h:667
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define _Out_writes_bytes_to_opt_(size, count)
Definition: ms_sal.h:361
#define _Must_inspect_result_
Definition: ms_sal.h:558
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ WDFIOTARGET _In_ WDFREQUEST _In_ ULONG _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET OtherArg1Offset
Definition: wdfiotarget.h:1298
_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
#define FILE_OPEN
Definition: from_kernel.h:54
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY DeviceProperty
Definition: wdfiotarget.h:622
_Must_inspect_result_ _In_ WDFIOTARGET _In_ LPCGUID InterfaceType
Definition: wdfiotarget.h:712
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
unsigned short USHORT
Definition: pedump.c:61
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:506
_Must_inspect_result_ _In_ WDFIOTARGET _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _When_(BufferLength !=0, _Out_writes_bytes_to_opt_(BufferLength, *ResultLength)) _When_(BufferLength
Definition: wdfiotarget.h:627
_WDF_IO_TARGET_SENT_IO_ACTION
Definition: wdfiotarget.h:69
_Must_inspect_result_ _In_ WDFIOTARGET _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdfiotarget.h:712
PFILE_OBJECT TargetFileObject
Definition: wdfiotarget.h:167
#define FORCEINLINE
Definition: wdftypes.h:67
#define _Out_opt_
Definition: ms_sal.h:346
unsigned int * PULONG
Definition: retypes.h:1
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS RequestOptions
Definition: wdfiotarget.h:859
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
_Must_inspect_result_ _In_ WDFIOTARGET _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT _In_opt_ PVOID InterfaceSpecificData
Definition: wdfiotarget.h:712
unsigned int ULONG
Definition: retypes.h:1
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIOTARGET * IoTarget
Definition: wdfiotarget.h:363
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t * PULONG_PTR
Definition: typedefs.h:65
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
#define WDF_EXTERN_C_END
Definition: wdfiotarget.h:40
EVT_WDF_IO_TARGET_QUERY_REMOVE * PFN_WDF_IO_TARGET_QUERY_REMOVE
Definition: wdfiotarget.h:95
#define WDF_EXTERN_C_START
Definition: wdfiotarget.h:39
_Must_inspect_result_ _In_ WDFIOTARGET _In_ WDFREQUEST _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET InputBufferOffset
Definition: wdfiotarget.h:996
ULONG ACCESS_MASK
Definition: nt_native.h:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:461
WDF_EXTERN_C_START enum _WDF_IO_TARGET_STATE * PWDF_IO_TARGET_STATE