ReactOS 0.4.16-dev-306-g647d351
fxrequestkm.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxRequestKm.cpp
8
9Abstract:
10
11 This module implements KM specific FxRequest object routines
12
13Author:
14
15
16
17Environment:
18
19 Kernel mode only
20
21Revision History:
22
23
24--*/
25
26#include "coreprivshared.hpp"
27
28// Tracing support
29extern "C" {
30// #include "FxRequestKm.tmh"
31}
32
33VOID
35 VOID
36 )
37/*++
38
39Routine Description:
40 This routine is never actually called by running code, it just has
41 WDFCASSERTs who upon failure, would not allow this file to be compiled.
42
43 DO NOT REMOVE THIS FUNCTION just because it is not called by any running
44 code.
45
46Arguments:
47 None
48
49Return Value:
50 None
51
52 --*/
53{
54 PWDF_REQUEST_PARAMETERS pWdfRequestParameters = NULL;
55 PIO_STACK_LOCATION pIoStackLocation = NULL;
56
57 UNREFERENCED_PARAMETER(pWdfRequestParameters);
58 UNREFERENCED_PARAMETER(pIoStackLocation);
59
60 //
61 // FxRequest::GetParameters relies on these being exactly the same size
62 //
63 WDFCASSERT(sizeof(pWdfRequestParameters->Parameters) ==
64 sizeof(pIoStackLocation->Parameters));
65
66 //
67 // The address of the offset in the structure needs to be 8 bit aligned
68 // so that we can store flags in the bottom 3 bits
69 //
72
75}
76
77
81 __out PMDL *pMdl
82 )
83{
84 WDF_DEVICE_IO_TYPE ioType;
89 KIRQL irql;
90 PMDL pNewMdl;
92
93 pBuffer = NULL;
94 length = 0;
96
97 Lock(&irql);
98
99 // Verifier
101
102 status = VerifyRequestIsNotCompleted(pFxDriverGlobals);
103 if(!NT_SUCCESS(status)) {
104 Unlock(irql);
105 return status;
106 }
107 }
108
109 //
110 // See if we have an IRP_MJ_DEVICE_CONTROL or IRP_MJ_INTERNAL_DEVICE_CONTROL
111 //
113
116
118 case METHOD_BUFFERED:
121
122 // Fall through to common buffer handler
123 break;
124
125 case METHOD_IN_DIRECT:
126 //
127 // InputBuffer is in SystemBuffer
128 // OutputBuffer is in MdlAddress with read access
129 //
132
133 // Fall through to common buffer handler
134 break;
135
137 //
138 // InputBuffer is in SystemBuffer
139 // OutputBuffer is in MdlAddress with write access
140 //
143
144 // Fall through to common buffer handler
145
146 break;
147
148 case METHOD_NEITHER:
149 default:
153 "Attempt to get UserMode MDL for METHOD_NEITHER DeviceControl 0x%x, "
154 "WDFDEVICE 0x%p, WDFREQUEST 0x%p, %!STATUS!",
157
160 "Driver must use METHOD_BUFFERED or METHOD_xx_DIRECT "
161 "I/O for this call, or use "
162 "WdfDeviceInitSetIoInCallerContextCallback to probe "
163 "and lock user mode memory");
164
165 *pMdl = NULL;
166 Unlock(irql);
167
168 return status;
169 }
170 }
171 else {
172 //
173 // It's a non-Device Control request, we must know the devices I/O type in
174 // order to safely return the correct buffer
175 //
176 ioType = GetDevice()->GetIoType();
177
178 if (ioType == WdfDeviceIoBuffered) {
179
181
182 //
183 // Must get the length depending on the request type code
184 //
185 if (majorFunction == IRP_MJ_READ) {
187 }
188 else if (majorFunction == IRP_MJ_WRITE) {
190 }
191 else {
192 //
193 // Report the error, we can support other IRP_MJ_xxx codes are required
194 // later
195 //
197
200 "WDFREQUEST %p no Automatic MDL mapping for buffered request"
201 "major function 0x%x available for WDFDEVICE 0x%p, %!STATUS!",
203 status);
204
205 *pMdl = NULL;
206
207 Unlock(irql);
208
209 return status;
210 }
211
212 // Fall through to common buffer handler
213 }
214 else if (ioType == WdfDeviceIoDirect) {
215
216 //
217 // If driver has used the default DO_DIRECT_IO I/O Mgr has done all the work
218 //
219 *pMdl = m_Irp.GetMdl();
220
221 if (*pMdl == NULL) {
223
226 "WDFREQUEST 0x%p for a direct io device, PMDL is NULL, "
227 "%!STATUS!", GetHandle(), status);
228 }
229 else {
231 }
232
233 Unlock(irql);
234
235 return status;
236 }
237 else if (ioType == WdfDeviceIoNeither) {
239
242 "Attempt to get UserMode Buffer Pointer for "
243 "WDFDEVICE 0x%p, WDFREQUEST 0x%p, %!STATUS!",
245
248 "Driver must use buffered or direct I/O for this "
249 "call, or use WdfDeviceInitSetIoInCallerContextCallback "
250 "to probe and lock user mode memory");
252
253 *pMdl = NULL;
254 Unlock(irql);
255
256 return status;
257 }
258 else {
260
263 "Unrecognized I/O Type %d on WDFDEVICE 0x%p, WDFREQUEST 0x%p, "
264 "%!STATUS!",
265 ioType, GetDevice()->GetHandle(), GetHandle(), status);
267
268 *pMdl = NULL;
269 Unlock(irql);
270
271 return status;
272 }
273 }
274
275 //
276 // if pBuffer != NULL, attempt to generate an MDL for it
277 //
278 if( (pBuffer == NULL) || (length == 0) ) {
279 *pMdl = NULL;
280 Unlock(irql);
281
283
284 if (pBuffer == NULL) {
287 "WDFREQUEST 0x%p, SystemBuffer is NULL, %!STATUS!",
288 GetHandle(), status);
289 }
290 else if (length == 0) {
293 "WDFREQUEST 0x%p, SystemBuffer length is 0, %!STATUS!",
294 GetHandle(), status);
295 }
296
297 return status;
298 }
299
300 //
301 // See if we have already allocated an MDL for this
302 //
303 if( m_AllocatedMdl != NULL ) {
304 *pMdl = m_AllocatedMdl;
305 Unlock(irql);
306 return STATUS_SUCCESS;
307 }
308
310 this,
311 pBuffer,
312 length,
313 FALSE,
314 FALSE);
315
316 if (pNewMdl == NULL) {
318
321 "Could not allocate MDL for buffer 0x%p Length %d, %!STATUS!",
323 *pMdl = NULL;
324 Unlock(irql);
325
326 return status;
327 }
328
330
331 //
332 // We associated the Mdl with the request object
333 // so it can be freed when completed.
334 //
335 m_AllocatedMdl = pNewMdl;
336
337 *pMdl = pNewMdl;
338
339 Unlock(irql);
340
341 return STATUS_SUCCESS;
342}
343
344
348 __out PMDL *pMdl
349 )
350/*++
351
352Routine Description:
353
354 Return the IRP_MJ_DEVICE_CONTROL OutputBuffer as an MDL
355
356 The MDL is automatically released when the request is completed.
357
358 The MDL is not valid for a METHOD_NEITHER IRP_MJ_DEVICE_CONTROL,
359 or for any request other than IRP_MJ_DEVICE_CONTROL.
360
361 The MDL is as follows for each buffering mode:
362
363 METHOD_BUFFERED:
364
365 MmBuildMdlForNonPagedPool(IoAllocateMdl(Irp->UserBuffer, ... ))
366
367 METHOD_IN_DIRECT:
368
369 Irp->MdlAddress
370
371 METHOD_OUT_DIRECT:
372
373 Irp->MdlAddress
374
375 METHOD_NEITHER:
376
377 NULL. Must use WdfDeviceInitSetIoInCallerContextCallback in order
378 to access the request in the calling threads address space before
379 it is placed into any I/O Queues.
380
381 The MDL is only valid until the request is completed.
382
383Arguments:
384
385 pMdl- Pointer location to return MDL ptr
386
387Returns:
388
389 NTSTATUS
390
391--*/
392{
395 KIRQL irql;
398 PMDL pNewMdl;
400
401 length = 0;
402 pBuffer = NULL;
404
405 Lock(&irql);
406
407 // Verifier
409
410 status = VerifyRequestIsNotCompleted(pFxDriverGlobals);
411 if (!NT_SUCCESS(status)) {
412 Unlock(irql);
413 return status;
414 }
415 }
416
417 //
418 // See if we have an IRP_MJ_DEVICE_CONTROL or IRP_MJ_INTERNAL_DEVICE_CONTROL
419 //
421
425
426 //
427 // It's a non-Device Control request, which is an error for this call
428 //
431 "WDFREQUEST %p (MajorFunction is 0x%x) this call is only valid for "
432 "IOCTLs, %!STATUS!", GetHandle(), majorFunction, status);
433 *pMdl = NULL;
434
435 Unlock(irql);
436
437 return status;
438 }
439
441 case METHOD_BUFFERED:
442
445
446 // Fall through to common buffer handler
447 break;
448
449 case METHOD_IN_DIRECT:
450 //
451 // InputBuffer is in SystemBuffer
452 // OutputBuffer is in MdlAddress with read access
453 //
454 *pMdl = m_Irp.GetMdl();
455
456 if (*pMdl == NULL) {
458
461 "WDFREQUEST 0x%p, METHOD_IN_DIRECT IOCTL, PMDL is NULL, "
462 "%!STATUS!", GetHandle(), status);
463 }
464 else {
466 }
467 Unlock(irql);
468
469 return status;
470
472 //
473 // InputBuffer is in SystemBuffer
474 // OutputBuffer is in MdlAddress with write access
475 //
476 *pMdl = m_Irp.GetMdl();
477
478 if (*pMdl == NULL) {
480
483 "WDFREQUEST 0x%p, METHOD_OUT_DIRECT IOCTL, PMDL is NULL, "
484 "%!STATUS!", GetHandle(), status);
485 }
486 else {
488 }
489 Unlock(irql);
490
491 return status;
492
493 case METHOD_NEITHER:
495
498 "Attempt to get UserMode Buffer Pointer for METHOD_NEITHER "
499 "DeviceControl 0x%x, WDFDEVICE 0x%p, WDFREQUEST 0x%p, %!STATUS!",
502
505 "Driver must use METHOD_BUFFERED or METHOD_xx_DIRECT I/O for this "
506 "call, or use WdfDeviceInitSetIoInCallerContextCallback to probe "
507 "and lock user mode memory");
508
509 *pMdl = NULL;
510 Unlock(irql);
511
512 return status;
513 }
514
515 //
516 // if pBuffer != NULL, attempt to generate an MDL for it
517 //
518 if( (pBuffer == NULL) || (length == 0) ) {
519 *pMdl = NULL;
520
521 Unlock(irql);
522
524
525 if (pBuffer == NULL) {
528 "WDFREQUEST 0x%p, SystemBuffer is NULL, %!STATUS!",
529 GetHandle(), status);
530 }
531 else if (length == 0) {
534 "WDFREQUEST 0x%p, SystemBuffer length is 0, %!STATUS!",
535 GetHandle(), status);
536 }
537
538 return status;
539 }
540
541 //
542 // See if we have already allocated an MDL for this
543 //
544 if( m_AllocatedMdl != NULL ) {
545 *pMdl = m_AllocatedMdl;
546 Unlock(irql);
547
548 return STATUS_SUCCESS;
549 }
550
552 this,
553 pBuffer,
554 length,
555 FALSE,
556 FALSE);
557
558 if (pNewMdl == NULL) {
560
563 "WDFREQUEST %p could not allocate MDL for buffer 0x%p Length %d, "
564 "%!STATUS!", GetHandle(), pBuffer, length, status);
565 *pMdl = NULL;
566 Unlock(irql);
567
568 return status;
569 }
570
572
573 //
574 // We associated the Mdl with the request object
575 // so it can be freed when completed.
576 //
577 m_AllocatedMdl = pNewMdl;
578
579 *pMdl = pNewMdl;
580
581 Unlock(irql);
582
583 return STATUS_SUCCESS;
584}
585
592 )
593
594/*++
595
596Routine Description:
597
598 Probe and lock a memory buffer for reading.
599
600 This is to be called in the proper process context, and
601 will generate an FxRequestMemory object if successful.
602
603 The FxRequestMemory object will be associated with the FxRequest
604 object, and is automatically released when the FxRequest is completed.
605
606 This function performs validation to ensure that the current
607 thread is in the same process as the thread that originated
608 the I/O request.
609
610Arguments:
611
612
613 Buffer - Buffer to lock down
614
615 Length - Length of buffer
616
617 MemoryObject - FxRequestMemory object to return
618
619Returns:
620
621 NTSTATUS
622
623--*/
624
625{
627 PMDL pMdl;
628 PIRP irp;
629 PVOID pVA;
632
633 pMdl = NULL;
634 pMemory = NULL;
636
637 if (Length == 0) {
639
642 "Length of zero not allowed, %!STATUS!", status);
643
644 return status;
645 }
646
647 irp = m_Irp.GetIrp();
648
649 if (irp == NULL) {
651
652 // Error, completed request
655 "WDFREQUEST %p has already been completed or has no PIRP assignment,"
656 " %!STATUS!", GetObjectHandle(), status);
657
659
660 return status;
661 }
662
663 //
664 // Look at the Irp, and if there is a thread field, validate we are
665 // actually in the correct process!
666 //
667 status = VerifyProbeAndLock(pFxDriverGlobals);
668 if(!NT_SUCCESS(status) ) {
669 return status;
670 }
671
673
674 if (pMdl == NULL) {
677 "Failed to allocate MDL %!STATUS!", status);
678 return status;
679 }
680
681 // Use a C utility function for the probe due to C++ exception handling issues
683
684 if (!NT_SUCCESS(status)) {
686 "Exception is raised for Address 0x%p, Length %d %!STATUS!",
689 return status;
690 }
691
692 //
693 // Get a system address for the MDL
694 //
696 if (pVA == NULL) {
698 goto Done;
699 }
700
701 // Build an FxRequestMemory object now
703 if (!NT_SUCCESS(status)) {
704 goto Done;
705 }
706
707 // Associate the FxRequestMemory object with the FxRequest
708 status = pMemory->Commit(NULL, NULL, this);
709 if (!NT_SUCCESS(status)) {
710 goto Done;
711 }
712
713Done:
714 if (NT_SUCCESS(status)) {
715 //
716 // If we re-define the WDFMEMORY interfaces to allow
717 // failure for get buffer, we could delay the assignment
718 // of SystemAddressForMdl and its PTE's until the driver
719 // actually requests a double buffer mapping.
720 //
721 // Some DMA drivers may just retrieve the MDL from the WDFMEMORY
722 // and not even attempt to access the underlying bytes, other
723 // than through hardware DMA.
724 //
725 pMemory->SetMdl(
726 this,
727 pMdl,
728 pVA,
729 Length,
730 TRUE // Readonly
731 );
732
734 }
735 else {
736 if (pMemory != NULL) {
738 }
739
740 Mx::MxUnlockPages(pMdl);
742 }
743
744 return status;
745}
746
753 )
754
755/*++
756
757Routine Description:
758
759 Probe and lock a memory buffer for writing.
760
761 This is to be called in the proper process context, and
762 will generate an FxRequestMemory object if successful.
763
764 The FxRequestMemory object will be associated with the FxRequest
765 object, and is automatically released when the FxRequest is completed.
766
767 This function performs validation to ensure that the current
768 thread is in the same process as the thread that originated
769 the I/O request.
770
771Arguments:
772
773
774 Buffer - Buffer to lock down
775
776 Length - Length of buffer
777
778 MemoryObject - FxRequestMemory object to return
779
780Returns:
781
782 NTSTATUS
783
784--*/
785
786{
788 PMDL pMdl;
789 PIRP irp;
790 PVOID pVA;
793
794 pMdl = NULL;
795 pMemory = NULL;
797
798 if (Length == 0) {
800
803 "Length of zero not allowed, %!STATUS!", status);
804
805 return status;
806 }
807
808 irp = m_Irp.GetIrp();
809
810 if (irp == NULL) {
812
813 // Error, completed request
816 "WDFREQUEST %p has already been completed or has no PIRP assignment,"
817 " %!STATUS!", GetObjectHandle(), status);
818
820
821 return status;
822 }
823
824 //
825 // Look at the Irp, and if there is a thread field, validate we are
826 // actually in the correct process!
827 //
828 status = VerifyProbeAndLock(pFxDriverGlobals);
829 if(!NT_SUCCESS(status) ) {
830 return status;
831 }
832
834 if (pMdl == NULL) {
837 "Failed to allocate MDL %!STATUS!", status);
838 return status;
839 }
840
841 // Use a C utility function for the probe due to C++ exception handling issues
843
844 if (!NT_SUCCESS(status)) {
846 "Exception is raised for Address 0x%p, Length %d %!STATUS!",
849 return status;
850 }
851
852 //
853 // Get a system address for the MDL
854 //
856 if (pVA == NULL) {
858 goto Done;
859 }
860
861 // Build an FxRequestMemory object now
863 if (!NT_SUCCESS(status)) {
864 goto Done;
865 }
866
867 // Associate the FxRequestMemory object with the FxRequest
868 status = pMemory->Commit(NULL, NULL, this);
869 if (!NT_SUCCESS(status)) {
870 goto Done;
871 }
872
873Done:
874 if (NT_SUCCESS(status)) {
875 //
876 // If we re-define the WDFMEMORY interfaces to allow
877 // failure for get buffer, we could delay the assignment
878 // of SystemAddressForMdl and its PTE's until the driver
879 // actually requests a double buffer mapping.
880 //
881 // Some DMA drivers may just retrieve the MDL from the WDFMEMORY
882 // and not even attempt to access the underlying bytes, other
883 // than through hardware DMA.
884 //
885 pMemory->SetMdl(
886 this,
887 pMdl,
888 pVA,
889 Length,
890 FALSE // FALSE indicates not a readonly buffer
891 );
892
894 }
895 else {
896 if (pMemory != NULL) {
898 }
899
900 Mx::MxUnlockPages(pMdl);
902 }
903
904 return status;
905}
906
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
ULONG GetParameterWriteLength(VOID)
Definition: fxirpum.cpp:1601
ULONG GetParameterIoctlCodeBufferMethod(VOID)
Definition: fxirpum.cpp:1490
ULONG GetParameterIoctlCode(VOID)
Definition: fxirpum.cpp:1474
ULONG GetParameterIoctlOutputBufferLength(VOID)
Definition: fxirpum.cpp:1504
PMDL GetMdl()
Definition: fxirpum.cpp:625
PVOID GetSystemBuffer()
Definition: fxirpum.cpp:543
MdIrp GetIrp(VOID)
Definition: fxirpum.cpp:15
ULONG GetParameterIoctlInputBufferLength(VOID)
Definition: fxirpum.cpp:1518
ULONG GetParameterReadLength(VOID)
Definition: fxirpum.cpp:1589
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
Definition: fxobject.hpp:1474
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
Definition: fxobject.cpp:904
WDFOBJECT_OFFSET_ALIGNED m_OutputBufferOffset
WDFOBJECT_OFFSET_ALIGNED m_SystemBufferOffset
static NTSTATUS Create(__in PFX_DRIVER_GLOBALS DriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out FxRequestMemory **Object)
_Must_inspect_result_ NTSTATUS GetDeviceControlOutputMdl(__out PMDL *pMdl)
_Must_inspect_result_ NTSTATUS ProbeAndLockForRead(__in PVOID Buffer, __in ULONG Length, __deref_out FxRequestMemory **pMemoryObject)
_Must_inspect_result_ NTSTATUS GetMdl(__out PMDL *pMdl)
Definition: fxrequestkm.cpp:80
_Must_inspect_result_ NTSTATUS ProbeAndLockForWrite(__in PVOID Buffer, __in ULONG Length, __deref_out FxRequestMemory **pMemoryObject)
static VOID CheckAssumptions(VOID)
Definition: fxrequestkm.cpp:34
static __inline VOID MxUnlockPages(__in PMDL Mdl)
Definition: mxgeneralkm.h:357
static __inline VOID MxBuildMdlForNonPagedPool(__inout PMDL Mdl)
Definition: mxgeneralkm.h:376
static __inline PVOID MxGetSystemAddressForMdlSafe(__inout PMDL Mdl, __in ULONG Priority)
Definition: mxgeneralkm.h:366
#define __in
Definition: dbghelp.h:35
#define __deref_out
Definition: dbghelp.h:26
#define __out
Definition: dbghelp.h:62
#define TRACINGREQUEST
Definition: dbgtrace.h:65
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
return pList GetDevice()
PFX_DRIVER_GLOBALS pFxDriverGlobals
return pObject GetObjectHandle()
FxVerifierDbgBreakPoint(pFxDriverGlobals)
FxMemoryObject * pMemory
VOID __inline FxMdlFree(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PMDL Mdl)
Definition: fxmdl.h:60
PMDL FORCEINLINE FxMdlAllocate(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Owner, __in PVOID VirtualAddress, __in ULONG Length, __in BOOLEAN SecondaryBuffer, __in BOOLEAN ChargeQuota)
Definition: fxmdl.h:31
@ FxHandleFlagMask
Definition: fxobject.hpp:62
NTSTATUS FxProbeAndLockForWrite(__in PMDL Mdl, __in KPROCESSOR_MODE AccessMode)
Definition: probeandlock.c:55
NTSTATUS FxProbeAndLockForRead(__in PMDL Mdl, __in KPROCESSOR_MODE AccessMode)
Definition: probeandlock.c:36
UCHAR majorFunction
FxIrp * irp
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
@ NormalPagePriority
Definition: imports.h:54
#define UserMode
Definition: asm.h:35
#define _Must_inspect_result_
Definition: no_sal2.h:62
#define METHOD_NEITHER
Definition: nt_native.h:597
#define METHOD_OUT_DIRECT
Definition: nt_native.h:596
#define METHOD_BUFFERED
Definition: nt_native.h:594
#define METHOD_IN_DIRECT
Definition: nt_native.h:595
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_INTERNAL_ERROR
Definition: ntstatus.h:465
PVOID pBuffer
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
BOOLEAN FxVerifierIO
Definition: fxglobals.h:446
struct _IO_STACK_LOCATION::@3979::@3984 Write
struct _IO_STACK_LOCATION::@3979::@3983 Read
union _IO_STACK_LOCATION::@1580 Parameters
union _WDF_REQUEST_PARAMETERS::@3882 Parameters
Definition: ps.c:97
#define GetHandle(h)
Definition: treelist.c:116
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_INVALID_USER_BUFFER
Definition: udferr_usr.h:166
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define WDFCASSERT(c)
Definition: wdfassert.h:93
enum _WDF_DEVICE_IO_TYPE WDF_DEVICE_IO_TYPE
@ WdfDeviceIoNeither
Definition: wdfdevice.h:451
@ WdfDeviceIoBuffered
Definition: wdfdevice.h:452
@ WdfDeviceIoDirect
Definition: wdfdevice.h:453
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t _Out_ WDFMEMORY * MemoryObject
Definition: wdfrequest.h:1473
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
unsigned char UCHAR
Definition: xmlstorage.h:181