153 "Attempt to get UserMode MDL for METHOD_NEITHER DeviceControl 0x%x, "
154 "WDFDEVICE 0x%p, WDFREQUEST 0x%p, %!STATUS!",
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");
200 "WDFREQUEST %p no Automatic MDL mapping for buffered request"
201 "major function 0x%x available for WDFDEVICE 0x%p, %!STATUS!",
226 "WDFREQUEST 0x%p for a direct io device, PMDL is NULL, "
242 "Attempt to get UserMode Buffer Pointer for "
243 "WDFDEVICE 0x%p, WDFREQUEST 0x%p, %!STATUS!",
248 "Driver must use buffered or direct I/O for this "
249 "call, or use WdfDeviceInitSetIoInCallerContextCallback "
250 "to probe and lock user mode memory");
263 "Unrecognized I/O Type %d on WDFDEVICE 0x%p, WDFREQUEST 0x%p, "
287 "WDFREQUEST 0x%p, SystemBuffer is NULL, %!STATUS!",
293 "WDFREQUEST 0x%p, SystemBuffer length is 0, %!STATUS!",
316 if (pNewMdl ==
NULL) {
321 "Could not allocate MDL for buffer 0x%p Length %d, %!STATUS!",
431 "WDFREQUEST %p (MajorFunction is 0x%x) this call is only valid for "
461 "WDFREQUEST 0x%p, METHOD_IN_DIRECT IOCTL, PMDL is NULL, "
483 "WDFREQUEST 0x%p, METHOD_OUT_DIRECT IOCTL, PMDL is NULL, "
498 "Attempt to get UserMode Buffer Pointer for METHOD_NEITHER "
499 "DeviceControl 0x%x, WDFDEVICE 0x%p, WDFREQUEST 0x%p, %!STATUS!",
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");
528 "WDFREQUEST 0x%p, SystemBuffer is NULL, %!STATUS!",
534 "WDFREQUEST 0x%p, SystemBuffer length is 0, %!STATUS!",
558 if (pNewMdl ==
NULL) {
563 "WDFREQUEST %p could not allocate MDL for buffer 0x%p Length %d, "
642 "Length of zero not allowed, %!STATUS!",
status);
655 "WDFREQUEST %p has already been completed or has no PIRP assignment,"
677 "Failed to allocate MDL %!STATUS!",
status);
686 "Exception is raised for Address 0x%p, Length %d %!STATUS!",
803 "Length of zero not allowed, %!STATUS!",
status);
816 "WDFREQUEST %p has already been completed or has no PIRP assignment,"
837 "Failed to allocate MDL %!STATUS!",
status);
846 "Exception is raised for Address 0x%p, Length %d %!STATUS!",
UCHAR GetMajorFunction(VOID)
ULONG GetParameterWriteLength(VOID)
ULONG GetParameterIoctlCodeBufferMethod(VOID)
ULONG GetParameterIoctlCode(VOID)
ULONG GetParameterIoctlOutputBufferLength(VOID)
ULONG GetParameterIoctlInputBufferLength(VOID)
ULONG GetParameterReadLength(VOID)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
VOID DeleteFromFailedCreate(VOID)
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
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)
_Must_inspect_result_ NTSTATUS ProbeAndLockForWrite(__in PVOID Buffer, __in ULONG Length, __deref_out FxRequestMemory **pMemoryObject)
static VOID CheckAssumptions(VOID)
static __inline VOID MxUnlockPages(__in PMDL Mdl)
static __inline VOID MxBuildMdlForNonPagedPool(__inout PMDL Mdl)
static __inline PVOID MxGetSystemAddressForMdlSafe(__inout PMDL Mdl, __in ULONG Priority)
#define NT_SUCCESS(StatCode)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFX_DRIVER_GLOBALS pFxDriverGlobals
return pObject GetObjectHandle()
FxVerifierDbgBreakPoint(pFxDriverGlobals)
VOID __inline FxMdlFree(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PMDL Mdl)
PMDL FORCEINLINE FxMdlAllocate(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Owner, __in PVOID VirtualAddress, __in ULONG Length, __in BOOLEAN SecondaryBuffer, __in BOOLEAN ChargeQuota)
NTSTATUS FxProbeAndLockForWrite(__in PMDL Mdl, __in KPROCESSOR_MODE AccessMode)
NTSTATUS FxProbeAndLockForRead(__in PMDL Mdl, __in KPROCESSOR_MODE AccessMode)
GLuint GLsizei GLsizei * length
#define _Must_inspect_result_
#define METHOD_OUT_DIRECT
#define UNREFERENCED_PARAMETER(P)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define STATUS_INTERNAL_ERROR
#define IRP_MJ_DEVICE_CONTROL
#define STATUS_BUFFER_TOO_SMALL
#define TRACE_LEVEL_ERROR
struct _IO_STACK_LOCATION::@3974::@3979 Write
struct _IO_STACK_LOCATION::@3974::@3978 Read
union _IO_STACK_LOCATION::@1575 Parameters
union _WDF_REQUEST_PARAMETERS::@3877 Parameters
#define FIELD_OFFSET(t, f)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_INVALID_PARAMETER
#define STATUS_INVALID_USER_BUFFER
#define STATUS_INSUFFICIENT_RESOURCES
enum _WDF_DEVICE_IO_TYPE WDF_DEVICE_IO_TYPE
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t _Out_ WDFMEMORY * MemoryObject
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
#define IRP_MJ_INTERNAL_DEVICE_CONTROL