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
44 WDF_EXTERN_C_START
45
46
47
48
49 #if (NTDDI_VERSION >= NTDDI_WIN2K)
50
51 typedef enum _WDF_IO_TARGET_STATE {
52 WdfIoTargetStateUndefined = 0,
53 WdfIoTargetStarted,
54 WdfIoTargetStopped,
55 WdfIoTargetClosedForQueryRemove,
56 WdfIoTargetClosed,
57 WdfIoTargetDeleted,
58 WdfIoTargetPurged,
59 } WDF_IO_TARGET_STATE, *PWDF_IO_TARGET_STATE;
60
61 typedef enum _WDF_IO_TARGET_OPEN_TYPE {
62 WdfIoTargetOpenUndefined = 0,
63 WdfIoTargetOpenUseExistingDevice = 1,
64 WdfIoTargetOpenByName = 2,
65 WdfIoTargetOpenReopen = 3,
66 WdfIoTargetOpenLocalTargetByFile = 4,
67 } WDF_IO_TARGET_OPEN_TYPE;
68
69 typedef enum _WDF_IO_TARGET_SENT_IO_ACTION {
70 WdfIoTargetSentIoUndefined = 0,
71 WdfIoTargetCancelSentIo,
72 WdfIoTargetWaitForSentIoToComplete,
73 WdfIoTargetLeaveSentIoPending,
74 } WDF_IO_TARGET_SENT_IO_ACTION;
75
76 typedef enum _WDF_IO_TARGET_PURGE_IO_ACTION {
77 WdfIoTargetPurgeIoUndefined = 0,
78 WdfIoTargetPurgeIoAndWait = 1,
79 WdfIoTargetPurgeIo = 2,
80 } WDF_IO_TARGET_PURGE_IO_ACTION;
81
82
83
84 typedef
85 _Function_class_(EVT_WDF_IO_TARGET_QUERY_REMOVE)
86 _IRQL_requires_same_
87 _IRQL_requires_max_(PASSIVE_LEVEL)
88 NTSTATUS
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)
99 _IRQL_requires_same_
100 _IRQL_requires_max_(PASSIVE_LEVEL)
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)
112 _IRQL_requires_same_
113 _IRQL_requires_max_(PASSIVE_LEVEL)
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
123 typedef struct _WDF_IO_TARGET_OPEN_PARAMS {
124 //
125 // Size of this structure in bytes
126 //
127 ULONG Size;
128
129 //
130 // Indicates which fields of this structure are going to be used in
131 // creating the WDFIOTARGET.
132 //
133 WDF_IO_TARGET_OPEN_TYPE Type;
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 //
140 PFN_WDF_IO_TARGET_QUERY_REMOVE EvtIoTargetQueryRemove;
141
142 //
143 // The previous query remove has been canceled and the target can now be
144 // reopened.
145 //
146 PFN_WDF_IO_TARGET_REMOVE_CANCELED EvtIoTargetRemoveCanceled;
147
148 //
149 // The query remove has succeeded and the target is now removed from the
150 // system.
151 //
152 PFN_WDF_IO_TARGET_REMOVE_COMPLETE EvtIoTargetRemoveComplete;
153
154
155 // <KMDF_ONLY/>
156 // ========== WdfIoTargetOpenUseExistingDevice begin ==========
157 //
158 // The device object to send requests to
159 //
160 PDEVICE_OBJECT TargetDeviceObject;
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 //
167 PFILE_OBJECT TargetFileObject;
168
169 // ========== WdfIoTargetOpenUseExistingDevice end ==========
170
171 // ========== WdfIoTargetOpenByName begin ==========
172 //
173 // Name of the device to open.
174 //
175 UNICODE_STRING TargetDeviceName;
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 //
190 ACCESS_MASK DesiredAccess;
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 //
205 ULONG ShareAccess;
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 //
218 ULONG FileAttributes;
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 //
231 ULONG CreateDisposition;
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 //
238 ULONG CreateOptions;
239
240 //
241 // <KMDF_ONLY/>
242 //
243 PVOID EaBuffer;
244
245 //
246 // <KMDF_ONLY/>
247 //
248 ULONG EaBufferLength;
249
250 //
251 // <KMDF_ONLY/>
252 //
253 PLONGLONG AllocationSize;
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 //
264 ULONG FileInformation;
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 //
278 UNICODE_STRING FileName;
279
280 // ========== WdfIoTargetOpenLocalTargetByFile end ==========
281
282 } WDF_IO_TARGET_OPEN_PARAMS, *PWDF_IO_TARGET_OPEN_PARAMS;
283
284
285 FORCEINLINE
286 VOID
WDF_IO_TARGET_OPEN_PARAMS_INIT_EXISTING_DEVICE(_Out_ PWDF_IO_TARGET_OPEN_PARAMS Params,_In_ PDEVICE_OBJECT DeviceObject)287 WDF_IO_TARGET_OPEN_PARAMS_INIT_EXISTING_DEVICE(
288 _Out_ PWDF_IO_TARGET_OPEN_PARAMS Params,
289 _In_ PDEVICE_OBJECT DeviceObject
290 )
291 {
292 RtlZeroMemory(Params, sizeof(WDF_IO_TARGET_OPEN_PARAMS));
293
294 Params->Size = sizeof(WDF_IO_TARGET_OPEN_PARAMS);
295 Params->Type = WdfIoTargetOpenUseExistingDevice;
296
297 Params->TargetDeviceObject = DeviceObject;
298 }
299
300
301 FORCEINLINE
302 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)303 WDF_IO_TARGET_OPEN_PARAMS_INIT_CREATE_BY_NAME(
304 _Out_ PWDF_IO_TARGET_OPEN_PARAMS Params,
305 _In_ PCUNICODE_STRING TargetDeviceName,
306 _In_ ACCESS_MASK DesiredAccess
307 )
308 {
309 RtlZeroMemory(Params, sizeof(WDF_IO_TARGET_OPEN_PARAMS));
310
311 Params->Size = sizeof(WDF_IO_TARGET_OPEN_PARAMS);
312 Params->Type = WdfIoTargetOpenByName;
313
314 RtlCopyMemory(&Params->TargetDeviceName,
315 TargetDeviceName,
316 sizeof(UNICODE_STRING));
317 Params->DesiredAccess = DesiredAccess;
318 Params->CreateOptions = FILE_NON_DIRECTORY_FILE;
319 }
320
321 FORCEINLINE
322 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)323 WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_NAME(
324 _Out_ PWDF_IO_TARGET_OPEN_PARAMS Params,
325 _In_ PCUNICODE_STRING TargetDeviceName,
326 _In_ ACCESS_MASK DesiredAccess
327 )
328 {
329 WDF_IO_TARGET_OPEN_PARAMS_INIT_CREATE_BY_NAME(Params,
330 TargetDeviceName,
331 DesiredAccess);
332 Params->CreateDisposition = FILE_OPEN;
333 }
334
335
336
337
338 FORCEINLINE
339 VOID
WDF_IO_TARGET_OPEN_PARAMS_INIT_REOPEN(_Out_ PWDF_IO_TARGET_OPEN_PARAMS Params)340 WDF_IO_TARGET_OPEN_PARAMS_INIT_REOPEN(
341 _Out_ PWDF_IO_TARGET_OPEN_PARAMS Params
342 )
343 {
344 RtlZeroMemory(Params, sizeof(WDF_IO_TARGET_OPEN_PARAMS));
345
346 Params->Size = sizeof(WDF_IO_TARGET_OPEN_PARAMS);
347 Params->Type = WdfIoTargetOpenReopen;
348 }
349
350
351 //
352 // WDF Function: WdfIoTargetCreate
353 //
354 typedef
355 _Must_inspect_result_
356 _IRQL_requires_max_(PASSIVE_LEVEL)
357 WDFAPI
358 NTSTATUS
359 (STDCALL *PFN_WDFIOTARGETCREATE)(
360 _In_
361 PWDF_DRIVER_GLOBALS DriverGlobals,
362 _In_
363 WDFDEVICE Device,
364 _In_opt_
365 PWDF_OBJECT_ATTRIBUTES IoTargetAttributes,
366 _Out_
367 WDFIOTARGET* IoTarget
368 );
369
370 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)371 _IRQL_requires_max_(PASSIVE_LEVEL)
372 FORCEINLINE
373 NTSTATUS
374 WdfIoTargetCreate(
375 _In_
376 WDFDEVICE Device,
377 _In_opt_
378 PWDF_OBJECT_ATTRIBUTES IoTargetAttributes,
379 _Out_
380 WDFIOTARGET* IoTarget
381 )
382 {
383 return ((PFN_WDFIOTARGETCREATE) WdfFunctions[WdfIoTargetCreateTableIndex])(WdfDriverGlobals, Device, IoTargetAttributes, IoTarget);
384 }
385
386 //
387 // WDF Function: WdfIoTargetOpen
388 //
389 typedef
390 _Must_inspect_result_
391 _IRQL_requires_max_(PASSIVE_LEVEL)
392 WDFAPI
393 NTSTATUS
394 (STDCALL *PFN_WDFIOTARGETOPEN)(
395 _In_
396 PWDF_DRIVER_GLOBALS DriverGlobals,
397 _In_
398 WDFIOTARGET IoTarget,
399 _In_
400 PWDF_IO_TARGET_OPEN_PARAMS OpenParams
401 );
402
403 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)404 _IRQL_requires_max_(PASSIVE_LEVEL)
405 FORCEINLINE
406 NTSTATUS
407 WdfIoTargetOpen(
408 _In_
409 WDFIOTARGET IoTarget,
410 _In_
411 PWDF_IO_TARGET_OPEN_PARAMS OpenParams
412 )
413 {
414 return ((PFN_WDFIOTARGETOPEN) WdfFunctions[WdfIoTargetOpenTableIndex])(WdfDriverGlobals, IoTarget, OpenParams);
415 }
416
417 //
418 // WDF Function: WdfIoTargetCloseForQueryRemove
419 //
420 typedef
421 _IRQL_requires_max_(PASSIVE_LEVEL)
422 WDFAPI
423 VOID
424 (STDCALL *PFN_WDFIOTARGETCLOSEFORQUERYREMOVE)(
425 _In_
426 PWDF_DRIVER_GLOBALS DriverGlobals,
427 _In_
428 WDFIOTARGET IoTarget
429 );
430
_IRQL_requires_max_(PASSIVE_LEVEL)431 _IRQL_requires_max_(PASSIVE_LEVEL)
432 FORCEINLINE
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
446 _IRQL_requires_max_(PASSIVE_LEVEL)
447 WDFAPI
448 VOID
449 (STDCALL *PFN_WDFIOTARGETCLOSE)(
450 _In_
451 PWDF_DRIVER_GLOBALS DriverGlobals,
452 _In_
453 WDFIOTARGET IoTarget
454 );
455
_IRQL_requires_max_(PASSIVE_LEVEL)456 _IRQL_requires_max_(PASSIVE_LEVEL)
457 FORCEINLINE
458 VOID
459 WdfIoTargetClose(
460 _In_
461 WDFIOTARGET IoTarget
462 )
463 {
464 ((PFN_WDFIOTARGETCLOSE) WdfFunctions[WdfIoTargetCloseTableIndex])(WdfDriverGlobals, IoTarget);
465 }
466
467 //
468 // WDF Function: WdfIoTargetStart
469 //
470 typedef
471 _Must_inspect_result_
472 _IRQL_requires_max_(DISPATCH_LEVEL)
473 WDFAPI
474 NTSTATUS
475 (STDCALL *PFN_WDFIOTARGETSTART)(
476 _In_
477 PWDF_DRIVER_GLOBALS DriverGlobals,
478 _In_
479 WDFIOTARGET IoTarget
480 );
481
482 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)483 _IRQL_requires_max_(DISPATCH_LEVEL)
484 FORCEINLINE
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
498 _When_(Action == 3, _IRQL_requires_max_(DISPATCH_LEVEL))
499 _When_(Action == 0 || Action == 1 || Action == 2, _IRQL_requires_max_(PASSIVE_LEVEL))
500 WDFAPI
501 VOID
502 (STDCALL *PFN_WDFIOTARGETSTOP)(
503 _In_
504 PWDF_DRIVER_GLOBALS DriverGlobals,
505 _In_
506 WDFIOTARGET IoTarget,
507 _In_
508 _Strict_type_match_
509 WDF_IO_TARGET_SENT_IO_ACTION Action
510 );
511
512 _When_(Action == 3, _IRQL_requires_max_(DISPATCH_LEVEL))
513 _When_(Action == 0 || Action == 1 || Action == 2, _IRQL_requires_max_(PASSIVE_LEVEL))
514 FORCEINLINE
515 VOID
WdfIoTargetStop(_In_ WDFIOTARGET IoTarget,_In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action)516 WdfIoTargetStop(
517 _In_
518 WDFIOTARGET IoTarget,
519 _In_
520 _Strict_type_match_
521 WDF_IO_TARGET_SENT_IO_ACTION Action
522 )
523 {
524 ((PFN_WDFIOTARGETSTOP) WdfFunctions[WdfIoTargetStopTableIndex])(WdfDriverGlobals, IoTarget, Action);
525 }
526
527 //
528 // WDF Function: WdfIoTargetPurge
529 //
530 typedef
531 _When_(Action == 2, _IRQL_requires_max_(DISPATCH_LEVEL))
532 _When_(Action == 0 || Action == 1, _IRQL_requires_max_(PASSIVE_LEVEL))
533 WDFAPI
534 VOID
535 (STDCALL *PFN_WDFIOTARGETPURGE)(
536 _In_
537 PWDF_DRIVER_GLOBALS DriverGlobals,
538 _In_
539 WDFIOTARGET IoTarget,
540 _In_
541 _Strict_type_match_
542 WDF_IO_TARGET_PURGE_IO_ACTION Action
543 );
544
545 _When_(Action == 2, _IRQL_requires_max_(DISPATCH_LEVEL))
546 _When_(Action == 0 || Action == 1, _IRQL_requires_max_(PASSIVE_LEVEL))
547 FORCEINLINE
548 VOID
WdfIoTargetPurge(_In_ WDFIOTARGET IoTarget,_In_ _Strict_type_match_ WDF_IO_TARGET_PURGE_IO_ACTION Action)549 WdfIoTargetPurge(
550 _In_
551 WDFIOTARGET IoTarget,
552 _In_
553 _Strict_type_match_
554 WDF_IO_TARGET_PURGE_IO_ACTION Action
555 )
556 {
557 ((PFN_WDFIOTARGETPURGE) WdfFunctions[WdfIoTargetPurgeTableIndex])(WdfDriverGlobals, IoTarget, Action);
558 }
559
560 //
561 // WDF Function: WdfIoTargetGetState
562 //
563 typedef
564 _IRQL_requires_max_(DISPATCH_LEVEL)
565 WDFAPI
566 WDF_IO_TARGET_STATE
567 (STDCALL *PFN_WDFIOTARGETGETSTATE)(
568 _In_
569 PWDF_DRIVER_GLOBALS DriverGlobals,
570 _In_
571 WDFIOTARGET IoTarget
572 );
573
_IRQL_requires_max_(DISPATCH_LEVEL)574 _IRQL_requires_max_(DISPATCH_LEVEL)
575 FORCEINLINE
576 WDF_IO_TARGET_STATE
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
589 _IRQL_requires_max_(DISPATCH_LEVEL)
590 WDFAPI
591 WDFDEVICE
592 (STDCALL *PFN_WDFIOTARGETGETDEVICE)(
593 _In_
594 PWDF_DRIVER_GLOBALS DriverGlobals,
595 _In_
596 WDFIOTARGET IoTarget
597 );
598
_IRQL_requires_max_(DISPATCH_LEVEL)599 _IRQL_requires_max_(DISPATCH_LEVEL)
600 FORCEINLINE
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
614 _Must_inspect_result_
615 _IRQL_requires_max_(PASSIVE_LEVEL)
616 WDFAPI
617 NTSTATUS
618 (STDCALL *PFN_WDFIOTARGETQUERYTARGETPROPERTY)(
619 _In_
620 PWDF_DRIVER_GLOBALS DriverGlobals,
621 _In_
622 WDFIOTARGET IoTarget,
623 _In_
624 DEVICE_REGISTRY_PROPERTY DeviceProperty,
625 _In_
626 ULONG BufferLength,
627 _When_(BufferLength != 0, _Out_writes_bytes_to_opt_(BufferLength, *ResultLength))
628 _When_(BufferLength == 0, _Out_opt_)
629 PVOID PropertyBuffer,
630 _Deref_out_range_(<=,BufferLength)
631 PULONG ResultLength
632 );
633
634 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)635 _IRQL_requires_max_(PASSIVE_LEVEL)
636 FORCEINLINE
637 NTSTATUS
638 WdfIoTargetQueryTargetProperty(
639 _In_
640 WDFIOTARGET IoTarget,
641 _In_
642 DEVICE_REGISTRY_PROPERTY DeviceProperty,
643 _In_
644 ULONG BufferLength,
645 _When_(BufferLength != 0, _Out_writes_bytes_to_opt_(BufferLength, *ResultLength))
646 _When_(BufferLength == 0, _Out_opt_)
647 PVOID PropertyBuffer,
648 _Deref_out_range_(<=,BufferLength)
649 PULONG ResultLength
650 )
651 {
652 return ((PFN_WDFIOTARGETQUERYTARGETPROPERTY) WdfFunctions[WdfIoTargetQueryTargetPropertyTableIndex])(WdfDriverGlobals, IoTarget, DeviceProperty, BufferLength, PropertyBuffer, ResultLength);
653 }
654
655 //
656 // WDF Function: WdfIoTargetAllocAndQueryTargetProperty
657 //
658 typedef
659 _Must_inspect_result_
660 _IRQL_requires_max_(PASSIVE_LEVEL)
661 WDFAPI
662 NTSTATUS
663 (STDCALL *PFN_WDFIOTARGETALLOCANDQUERYTARGETPROPERTY)(
664 _In_
665 PWDF_DRIVER_GLOBALS DriverGlobals,
666 _In_
667 WDFIOTARGET IoTarget,
668 _In_
669 DEVICE_REGISTRY_PROPERTY DeviceProperty,
670 _In_
671 _Strict_type_match_
672 POOL_TYPE PoolType,
673 _In_opt_
674 PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
675 _Out_
676 WDFMEMORY* PropertyMemory
677 );
678
679 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)680 _IRQL_requires_max_(PASSIVE_LEVEL)
681 FORCEINLINE
682 NTSTATUS
683 WdfIoTargetAllocAndQueryTargetProperty(
684 _In_
685 WDFIOTARGET IoTarget,
686 _In_
687 DEVICE_REGISTRY_PROPERTY DeviceProperty,
688 _In_
689 _Strict_type_match_
690 POOL_TYPE PoolType,
691 _In_opt_
692 PWDF_OBJECT_ATTRIBUTES PropertyMemoryAttributes,
693 _Out_
694 WDFMEMORY* PropertyMemory
695 )
696 {
697 return ((PFN_WDFIOTARGETALLOCANDQUERYTARGETPROPERTY) WdfFunctions[WdfIoTargetAllocAndQueryTargetPropertyTableIndex])(WdfDriverGlobals, IoTarget, DeviceProperty, PoolType, PropertyMemoryAttributes, PropertyMemory);
698 }
699
700 //
701 // WDF Function: WdfIoTargetQueryForInterface
702 //
703 typedef
704 _Must_inspect_result_
705 _IRQL_requires_max_(PASSIVE_LEVEL)
706 WDFAPI
707 NTSTATUS
708 (STDCALL *PFN_WDFIOTARGETQUERYFORINTERFACE)(
709 _In_
710 PWDF_DRIVER_GLOBALS DriverGlobals,
711 _In_
712 WDFIOTARGET IoTarget,
713 _In_
714 LPCGUID InterfaceType,
715 _Out_
716 PINTERFACE Interface,
717 _In_
718 USHORT Size,
719 _In_
720 USHORT Version,
721 _In_opt_
722 PVOID InterfaceSpecificData
723 );
724
725 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)726 _IRQL_requires_max_(PASSIVE_LEVEL)
727 FORCEINLINE
728 NTSTATUS
729 WdfIoTargetQueryForInterface(
730 _In_
731 WDFIOTARGET IoTarget,
732 _In_
733 LPCGUID InterfaceType,
734 _Out_
735 PINTERFACE Interface,
736 _In_
737 USHORT Size,
738 _In_
739 USHORT Version,
740 _In_opt_
741 PVOID InterfaceSpecificData
742 )
743 {
744 return ((PFN_WDFIOTARGETQUERYFORINTERFACE) WdfFunctions[WdfIoTargetQueryForInterfaceTableIndex])(WdfDriverGlobals, IoTarget, InterfaceType, Interface, Size, Version, InterfaceSpecificData);
745 }
746
747 //
748 // WDF Function: WdfIoTargetWdmGetTargetDeviceObject
749 //
750 typedef
751 _IRQL_requires_max_(DISPATCH_LEVEL)
752 WDFAPI
753 PDEVICE_OBJECT
754 (STDCALL *PFN_WDFIOTARGETWDMGETTARGETDEVICEOBJECT)(
755 _In_
756 PWDF_DRIVER_GLOBALS DriverGlobals,
757 _In_
758 WDFIOTARGET IoTarget
759 );
760
_IRQL_requires_max_(DISPATCH_LEVEL)761 _IRQL_requires_max_(DISPATCH_LEVEL)
762 FORCEINLINE
763 PDEVICE_OBJECT
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
776 _IRQL_requires_max_(DISPATCH_LEVEL)
777 WDFAPI
778 PDEVICE_OBJECT
779 (STDCALL *PFN_WDFIOTARGETWDMGETTARGETPHYSICALDEVICE)(
780 _In_
781 PWDF_DRIVER_GLOBALS DriverGlobals,
782 _In_
783 WDFIOTARGET IoTarget
784 );
785
_IRQL_requires_max_(DISPATCH_LEVEL)786 _IRQL_requires_max_(DISPATCH_LEVEL)
787 FORCEINLINE
788 PDEVICE_OBJECT
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
801 _IRQL_requires_max_(DISPATCH_LEVEL)
802 WDFAPI
803 PFILE_OBJECT
804 (STDCALL *PFN_WDFIOTARGETWDMGETTARGETFILEOBJECT)(
805 _In_
806 PWDF_DRIVER_GLOBALS DriverGlobals,
807 _In_
808 WDFIOTARGET IoTarget
809 );
810
_IRQL_requires_max_(DISPATCH_LEVEL)811 _IRQL_requires_max_(DISPATCH_LEVEL)
812 FORCEINLINE
813 PFILE_OBJECT
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
826 _IRQL_requires_max_(DISPATCH_LEVEL)
827 WDFAPI
828 HANDLE
829 (STDCALL *PFN_WDFIOTARGETWDMGETTARGETFILEHANDLE)(
830 _In_
831 PWDF_DRIVER_GLOBALS DriverGlobals,
832 _In_
833 WDFIOTARGET IoTarget
834 );
835
_IRQL_requires_max_(DISPATCH_LEVEL)836 _IRQL_requires_max_(DISPATCH_LEVEL)
837 FORCEINLINE
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
851 _Must_inspect_result_
852 _IRQL_requires_max_(PASSIVE_LEVEL)
853 WDFAPI
854 NTSTATUS
855 (STDCALL *PFN_WDFIOTARGETSENDREADSYNCHRONOUSLY)(
856 _In_
857 PWDF_DRIVER_GLOBALS DriverGlobals,
858 _In_
859 WDFIOTARGET IoTarget,
860 _In_opt_
861 WDFREQUEST Request,
862 _In_opt_
863 PWDF_MEMORY_DESCRIPTOR OutputBuffer,
864 _In_opt_
865 PLONGLONG DeviceOffset,
866 _In_opt_
867 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
868 _Out_opt_
869 PULONG_PTR BytesRead
870 );
871
872 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)873 _IRQL_requires_max_(PASSIVE_LEVEL)
874 FORCEINLINE
875 NTSTATUS
876 WdfIoTargetSendReadSynchronously(
877 _In_
878 WDFIOTARGET IoTarget,
879 _In_opt_
880 WDFREQUEST Request,
881 _In_opt_
882 PWDF_MEMORY_DESCRIPTOR OutputBuffer,
883 _In_opt_
884 PLONGLONG DeviceOffset,
885 _In_opt_
886 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
887 _Out_opt_
888 PULONG_PTR BytesRead
889 )
890 {
891 return ((PFN_WDFIOTARGETSENDREADSYNCHRONOUSLY) WdfFunctions[WdfIoTargetSendReadSynchronouslyTableIndex])(WdfDriverGlobals, IoTarget, Request, OutputBuffer, DeviceOffset, RequestOptions, BytesRead);
892 }
893
894 //
895 // WDF Function: WdfIoTargetFormatRequestForRead
896 //
897 typedef
898 _Must_inspect_result_
899 _IRQL_requires_max_(DISPATCH_LEVEL)
900 WDFAPI
901 NTSTATUS
902 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORREAD)(
903 _In_
904 PWDF_DRIVER_GLOBALS DriverGlobals,
905 _In_
906 WDFIOTARGET IoTarget,
907 _In_
908 WDFREQUEST Request,
909 _In_opt_
910 WDFMEMORY OutputBuffer,
911 _In_opt_
912 PWDFMEMORY_OFFSET OutputBufferOffset,
913 _In_opt_
914 PLONGLONG DeviceOffset
915 );
916
917 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)918 _IRQL_requires_max_(DISPATCH_LEVEL)
919 FORCEINLINE
920 NTSTATUS
921 WdfIoTargetFormatRequestForRead(
922 _In_
923 WDFIOTARGET IoTarget,
924 _In_
925 WDFREQUEST Request,
926 _In_opt_
927 WDFMEMORY OutputBuffer,
928 _In_opt_
929 PWDFMEMORY_OFFSET OutputBufferOffset,
930 _In_opt_
931 PLONGLONG DeviceOffset
932 )
933 {
934 return ((PFN_WDFIOTARGETFORMATREQUESTFORREAD) WdfFunctions[WdfIoTargetFormatRequestForReadTableIndex])(WdfDriverGlobals, IoTarget, Request, OutputBuffer, OutputBufferOffset, DeviceOffset);
935 }
936
937 //
938 // WDF Function: WdfIoTargetSendWriteSynchronously
939 //
940 typedef
941 _Must_inspect_result_
942 _IRQL_requires_max_(PASSIVE_LEVEL)
943 WDFAPI
944 NTSTATUS
945 (STDCALL *PFN_WDFIOTARGETSENDWRITESYNCHRONOUSLY)(
946 _In_
947 PWDF_DRIVER_GLOBALS DriverGlobals,
948 _In_
949 WDFIOTARGET IoTarget,
950 _In_opt_
951 WDFREQUEST Request,
952 _In_opt_
953 PWDF_MEMORY_DESCRIPTOR InputBuffer,
954 _In_opt_
955 PLONGLONG DeviceOffset,
956 _In_opt_
957 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
958 _Out_opt_
959 PULONG_PTR BytesWritten
960 );
961
962 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)963 _IRQL_requires_max_(PASSIVE_LEVEL)
964 FORCEINLINE
965 NTSTATUS
966 WdfIoTargetSendWriteSynchronously(
967 _In_
968 WDFIOTARGET IoTarget,
969 _In_opt_
970 WDFREQUEST Request,
971 _In_opt_
972 PWDF_MEMORY_DESCRIPTOR InputBuffer,
973 _In_opt_
974 PLONGLONG DeviceOffset,
975 _In_opt_
976 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
977 _Out_opt_
978 PULONG_PTR BytesWritten
979 )
980 {
981 return ((PFN_WDFIOTARGETSENDWRITESYNCHRONOUSLY) WdfFunctions[WdfIoTargetSendWriteSynchronouslyTableIndex])(WdfDriverGlobals, IoTarget, Request, InputBuffer, DeviceOffset, RequestOptions, BytesWritten);
982 }
983
984 //
985 // WDF Function: WdfIoTargetFormatRequestForWrite
986 //
987 typedef
988 _Must_inspect_result_
989 _IRQL_requires_max_(DISPATCH_LEVEL)
990 WDFAPI
991 NTSTATUS
992 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORWRITE)(
993 _In_
994 PWDF_DRIVER_GLOBALS DriverGlobals,
995 _In_
996 WDFIOTARGET IoTarget,
997 _In_
998 WDFREQUEST Request,
999 _In_opt_
1000 WDFMEMORY InputBuffer,
1001 _In_opt_
1002 PWDFMEMORY_OFFSET InputBufferOffset,
1003 _In_opt_
1004 PLONGLONG DeviceOffset
1005 );
1006
1007 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)1008 _IRQL_requires_max_(DISPATCH_LEVEL)
1009 FORCEINLINE
1010 NTSTATUS
1011 WdfIoTargetFormatRequestForWrite(
1012 _In_
1013 WDFIOTARGET IoTarget,
1014 _In_
1015 WDFREQUEST Request,
1016 _In_opt_
1017 WDFMEMORY InputBuffer,
1018 _In_opt_
1019 PWDFMEMORY_OFFSET InputBufferOffset,
1020 _In_opt_
1021 PLONGLONG DeviceOffset
1022 )
1023 {
1024 return ((PFN_WDFIOTARGETFORMATREQUESTFORWRITE) WdfFunctions[WdfIoTargetFormatRequestForWriteTableIndex])(WdfDriverGlobals, IoTarget, Request, InputBuffer, InputBufferOffset, DeviceOffset);
1025 }
1026
1027 //
1028 // WDF Function: WdfIoTargetSendIoctlSynchronously
1029 //
1030 typedef
1031 _Must_inspect_result_
1032 _IRQL_requires_max_(PASSIVE_LEVEL)
1033 WDFAPI
1034 NTSTATUS
1035 (STDCALL *PFN_WDFIOTARGETSENDIOCTLSYNCHRONOUSLY)(
1036 _In_
1037 PWDF_DRIVER_GLOBALS DriverGlobals,
1038 _In_
1039 WDFIOTARGET IoTarget,
1040 _In_opt_
1041 WDFREQUEST Request,
1042 _In_
1043 ULONG IoctlCode,
1044 _In_opt_
1045 PWDF_MEMORY_DESCRIPTOR InputBuffer,
1046 _In_opt_
1047 PWDF_MEMORY_DESCRIPTOR OutputBuffer,
1048 _In_opt_
1049 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
1050 _Out_opt_
1051 PULONG_PTR BytesReturned
1052 );
1053
1054 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)1055 _IRQL_requires_max_(PASSIVE_LEVEL)
1056 FORCEINLINE
1057 NTSTATUS
1058 WdfIoTargetSendIoctlSynchronously(
1059 _In_
1060 WDFIOTARGET IoTarget,
1061 _In_opt_
1062 WDFREQUEST Request,
1063 _In_
1064 ULONG IoctlCode,
1065 _In_opt_
1066 PWDF_MEMORY_DESCRIPTOR InputBuffer,
1067 _In_opt_
1068 PWDF_MEMORY_DESCRIPTOR OutputBuffer,
1069 _In_opt_
1070 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
1071 _Out_opt_
1072 PULONG_PTR BytesReturned
1073 )
1074 {
1075 return ((PFN_WDFIOTARGETSENDIOCTLSYNCHRONOUSLY) WdfFunctions[WdfIoTargetSendIoctlSynchronouslyTableIndex])(WdfDriverGlobals, IoTarget, Request, IoctlCode, InputBuffer, OutputBuffer, RequestOptions, BytesReturned);
1076 }
1077
1078 //
1079 // WDF Function: WdfIoTargetFormatRequestForIoctl
1080 //
1081 typedef
1082 _Must_inspect_result_
1083 _IRQL_requires_max_(DISPATCH_LEVEL)
1084 WDFAPI
1085 NTSTATUS
1086 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORIOCTL)(
1087 _In_
1088 PWDF_DRIVER_GLOBALS DriverGlobals,
1089 _In_
1090 WDFIOTARGET IoTarget,
1091 _In_
1092 WDFREQUEST Request,
1093 _In_
1094 ULONG IoctlCode,
1095 _In_opt_
1096 WDFMEMORY InputBuffer,
1097 _In_opt_
1098 PWDFMEMORY_OFFSET InputBufferOffset,
1099 _In_opt_
1100 WDFMEMORY OutputBuffer,
1101 _In_opt_
1102 PWDFMEMORY_OFFSET OutputBufferOffset
1103 );
1104
1105 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)1106 _IRQL_requires_max_(DISPATCH_LEVEL)
1107 FORCEINLINE
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_
1119 PWDFMEMORY_OFFSET InputBufferOffset,
1120 _In_opt_
1121 WDFMEMORY OutputBuffer,
1122 _In_opt_
1123 PWDFMEMORY_OFFSET OutputBufferOffset
1124 )
1125 {
1126 return ((PFN_WDFIOTARGETFORMATREQUESTFORIOCTL) WdfFunctions[WdfIoTargetFormatRequestForIoctlTableIndex])(WdfDriverGlobals, IoTarget, Request, IoctlCode, InputBuffer, InputBufferOffset, OutputBuffer, OutputBufferOffset);
1127 }
1128
1129 //
1130 // WDF Function: WdfIoTargetSendInternalIoctlSynchronously
1131 //
1132 typedef
1133 _Must_inspect_result_
1134 _IRQL_requires_max_(PASSIVE_LEVEL)
1135 WDFAPI
1136 NTSTATUS
1137 (STDCALL *PFN_WDFIOTARGETSENDINTERNALIOCTLSYNCHRONOUSLY)(
1138 _In_
1139 PWDF_DRIVER_GLOBALS DriverGlobals,
1140 _In_
1141 WDFIOTARGET IoTarget,
1142 _In_opt_
1143 WDFREQUEST Request,
1144 _In_
1145 ULONG IoctlCode,
1146 _In_opt_
1147 PWDF_MEMORY_DESCRIPTOR InputBuffer,
1148 _In_opt_
1149 PWDF_MEMORY_DESCRIPTOR OutputBuffer,
1150 _In_opt_
1151 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
1152 _Out_opt_
1153 PULONG_PTR BytesReturned
1154 );
1155
1156 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)1157 _IRQL_requires_max_(PASSIVE_LEVEL)
1158 FORCEINLINE
1159 NTSTATUS
1160 WdfIoTargetSendInternalIoctlSynchronously(
1161 _In_
1162 WDFIOTARGET IoTarget,
1163 _In_opt_
1164 WDFREQUEST Request,
1165 _In_
1166 ULONG IoctlCode,
1167 _In_opt_
1168 PWDF_MEMORY_DESCRIPTOR InputBuffer,
1169 _In_opt_
1170 PWDF_MEMORY_DESCRIPTOR OutputBuffer,
1171 _In_opt_
1172 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
1173 _Out_opt_
1174 PULONG_PTR BytesReturned
1175 )
1176 {
1177 return ((PFN_WDFIOTARGETSENDINTERNALIOCTLSYNCHRONOUSLY) WdfFunctions[WdfIoTargetSendInternalIoctlSynchronouslyTableIndex])(WdfDriverGlobals, IoTarget, Request, IoctlCode, InputBuffer, OutputBuffer, RequestOptions, BytesReturned);
1178 }
1179
1180 //
1181 // WDF Function: WdfIoTargetFormatRequestForInternalIoctl
1182 //
1183 typedef
1184 _Must_inspect_result_
1185 _IRQL_requires_max_(DISPATCH_LEVEL)
1186 WDFAPI
1187 NTSTATUS
1188 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTL)(
1189 _In_
1190 PWDF_DRIVER_GLOBALS DriverGlobals,
1191 _In_
1192 WDFIOTARGET IoTarget,
1193 _In_
1194 WDFREQUEST Request,
1195 _In_
1196 ULONG IoctlCode,
1197 _In_opt_
1198 WDFMEMORY InputBuffer,
1199 _In_opt_
1200 PWDFMEMORY_OFFSET InputBufferOffset,
1201 _In_opt_
1202 WDFMEMORY OutputBuffer,
1203 _In_opt_
1204 PWDFMEMORY_OFFSET OutputBufferOffset
1205 );
1206
1207 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)1208 _IRQL_requires_max_(DISPATCH_LEVEL)
1209 FORCEINLINE
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_
1221 PWDFMEMORY_OFFSET InputBufferOffset,
1222 _In_opt_
1223 WDFMEMORY OutputBuffer,
1224 _In_opt_
1225 PWDFMEMORY_OFFSET OutputBufferOffset
1226 )
1227 {
1228 return ((PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTL) WdfFunctions[WdfIoTargetFormatRequestForInternalIoctlTableIndex])(WdfDriverGlobals, IoTarget, Request, IoctlCode, InputBuffer, InputBufferOffset, OutputBuffer, OutputBufferOffset);
1229 }
1230
1231 //
1232 // WDF Function: WdfIoTargetSendInternalIoctlOthersSynchronously
1233 //
1234 typedef
1235 _Must_inspect_result_
1236 _IRQL_requires_max_(PASSIVE_LEVEL)
1237 WDFAPI
1238 NTSTATUS
1239 (STDCALL *PFN_WDFIOTARGETSENDINTERNALIOCTLOTHERSSYNCHRONOUSLY)(
1240 _In_
1241 PWDF_DRIVER_GLOBALS DriverGlobals,
1242 _In_
1243 WDFIOTARGET IoTarget,
1244 _In_opt_
1245 WDFREQUEST Request,
1246 _In_
1247 ULONG IoctlCode,
1248 _In_opt_
1249 PWDF_MEMORY_DESCRIPTOR OtherArg1,
1250 _In_opt_
1251 PWDF_MEMORY_DESCRIPTOR OtherArg2,
1252 _In_opt_
1253 PWDF_MEMORY_DESCRIPTOR OtherArg4,
1254 _In_opt_
1255 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
1256 _Out_opt_
1257 PULONG_PTR BytesReturned
1258 );
1259
1260 _Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)1261 _IRQL_requires_max_(PASSIVE_LEVEL)
1262 FORCEINLINE
1263 NTSTATUS
1264 WdfIoTargetSendInternalIoctlOthersSynchronously(
1265 _In_
1266 WDFIOTARGET IoTarget,
1267 _In_opt_
1268 WDFREQUEST Request,
1269 _In_
1270 ULONG IoctlCode,
1271 _In_opt_
1272 PWDF_MEMORY_DESCRIPTOR OtherArg1,
1273 _In_opt_
1274 PWDF_MEMORY_DESCRIPTOR OtherArg2,
1275 _In_opt_
1276 PWDF_MEMORY_DESCRIPTOR OtherArg4,
1277 _In_opt_
1278 PWDF_REQUEST_SEND_OPTIONS RequestOptions,
1279 _Out_opt_
1280 PULONG_PTR BytesReturned
1281 )
1282 {
1283 return ((PFN_WDFIOTARGETSENDINTERNALIOCTLOTHERSSYNCHRONOUSLY) WdfFunctions[WdfIoTargetSendInternalIoctlOthersSynchronouslyTableIndex])(WdfDriverGlobals, IoTarget, Request, IoctlCode, OtherArg1, OtherArg2, OtherArg4, RequestOptions, BytesReturned);
1284 }
1285
1286 //
1287 // WDF Function: WdfIoTargetFormatRequestForInternalIoctlOthers
1288 //
1289 typedef
1290 _Must_inspect_result_
1291 _IRQL_requires_max_(DISPATCH_LEVEL)
1292 WDFAPI
1293 NTSTATUS
1294 (STDCALL *PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTLOTHERS)(
1295 _In_
1296 PWDF_DRIVER_GLOBALS DriverGlobals,
1297 _In_
1298 WDFIOTARGET IoTarget,
1299 _In_
1300 WDFREQUEST Request,
1301 _In_
1302 ULONG IoctlCode,
1303 _In_opt_
1304 WDFMEMORY OtherArg1,
1305 _In_opt_
1306 PWDFMEMORY_OFFSET OtherArg1Offset,
1307 _In_opt_
1308 WDFMEMORY OtherArg2,
1309 _In_opt_
1310 PWDFMEMORY_OFFSET OtherArg2Offset,
1311 _In_opt_
1312 WDFMEMORY OtherArg4,
1313 _In_opt_
1314 PWDFMEMORY_OFFSET OtherArg4Offset
1315 );
1316
1317 _Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)1318 _IRQL_requires_max_(DISPATCH_LEVEL)
1319 FORCEINLINE
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_
1331 PWDFMEMORY_OFFSET OtherArg1Offset,
1332 _In_opt_
1333 WDFMEMORY OtherArg2,
1334 _In_opt_
1335 PWDFMEMORY_OFFSET OtherArg2Offset,
1336 _In_opt_
1337 WDFMEMORY OtherArg4,
1338 _In_opt_
1339 PWDFMEMORY_OFFSET OtherArg4Offset
1340 )
1341 {
1342 return ((PFN_WDFIOTARGETFORMATREQUESTFORINTERNALIOCTLOTHERS) WdfFunctions[WdfIoTargetFormatRequestForInternalIoctlOthersTableIndex])(WdfDriverGlobals, IoTarget, Request, IoctlCode, OtherArg1, OtherArg1Offset, OtherArg2, OtherArg2Offset, OtherArg4, OtherArg4Offset);
1343 }
1344
1345
1346
1347 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
1348
1349
1350
1351 WDF_EXTERN_C_END
1352
1353 #endif // _WDFIOTARGET_H_
1354
1355