31 #ifndef _WDFREQUEST_H_ 32 #define _WDFREQUEST_H_ 36 #define WDF_EXTERN_C extern "C" 37 #define WDF_EXTERN_C_START extern "C" { 38 #define WDF_EXTERN_C_END } 41 #define WDF_EXTERN_C_START 42 #define WDF_EXTERN_C_END 50 #if (NTDDI_VERSION >= NTDDI_WIN2K) 125 EVT_WDF_REQUEST_CANCEL(
302 EVT_WDF_REQUEST_COMPLETION_ROUTINE(
474 (
STDCALL *PFN_WDFREQUESTCREATE)(
509 (
STDCALL *PFN_WDFREQUESTCREATEFROMIRP)(
526 WdfRequestCreateFromIrp(
547 (
STDCALL *PFN_WDFREQUESTREUSE)(
577 (
STDCALL *PFN_WDFREQUESTCHANGETARGET)(
590 WdfRequestChangeTarget(
607 (
STDCALL *PFN_WDFREQUESTFORMATREQUESTUSINGCURRENTTYPE)(
617 WdfRequestFormatRequestUsingCurrentType(
632 (
STDCALL *PFN_WDFREQUESTWDMFORMATUSINGSTACKLOCATION)(
644 WdfRequestWdmFormatUsingStackLocation(
697 (
STDCALL *PFN_WDFREQUESTGETSTATUS)(
723 (
STDCALL *PFN_WDFREQUESTMARKCANCELABLE)(
735 WdfRequestMarkCancelable(
753 (
STDCALL *PFN_WDFREQUESTMARKCANCELABLEEX)(
766 WdfRequestMarkCancelableEx(
784 (
STDCALL *PFN_WDFREQUESTUNMARKCANCELABLE)(
795 WdfRequestUnmarkCancelable(
811 (
STDCALL *PFN_WDFREQUESTISCANCELED)(
822 WdfRequestIsCanceled(
837 (
STDCALL *PFN_WDFREQUESTCANCELSENTREQUEST)(
847 WdfRequestCancelSentRequest(
863 (
STDCALL *PFN_WDFREQUESTISFROM32BITPROCESS)(
874 WdfRequestIsFrom32BitProcess(
889 (
STDCALL *PFN_WDFREQUESTSETCOMPLETIONROUTINE)(
903 WdfRequestSetCompletionRoutine(
922 (
STDCALL *PFN_WDFREQUESTGETCOMPLETIONPARAMS)(
934 WdfRequestGetCompletionParams(
952 (
STDCALL *PFN_WDFREQUESTALLOCATETIMER)(
963 WdfRequestAllocateTimer(
978 (
STDCALL *PFN_WDFREQUESTCOMPLETE)(
1007 (
STDCALL *PFN_WDFREQUESTCOMPLETEWITHPRIORITYBOOST)(
1021 WdfRequestCompleteWithPriorityBoost(
1040 (
STDCALL *PFN_WDFREQUESTCOMPLETEWITHINFORMATION)(
1054 WdfRequestCompleteWithInformation(
1073 (
STDCALL *PFN_WDFREQUESTGETPARAMETERS)(
1085 WdfRequestGetParameters(
1103 (
STDCALL *PFN_WDFREQUESTRETRIEVEINPUTMEMORY)(
1116 WdfRequestRetrieveInputMemory(
1134 (
STDCALL *PFN_WDFREQUESTRETRIEVEOUTPUTMEMORY)(
1147 WdfRequestRetrieveOutputMemory(
1165 (
STDCALL *PFN_WDFREQUESTRETRIEVEINPUTBUFFER)(
1182 WdfRequestRetrieveInputBuffer(
1204 (
STDCALL *PFN_WDFREQUESTRETRIEVEOUTPUTBUFFER)(
1221 WdfRequestRetrieveOutputBuffer(
1243 (
STDCALL *PFN_WDFREQUESTRETRIEVEINPUTWDMMDL)(
1256 WdfRequestRetrieveInputWdmMdl(
1274 (
STDCALL *PFN_WDFREQUESTRETRIEVEOUTPUTWDMMDL)(
1287 WdfRequestRetrieveOutputWdmMdl(
1305 (
STDCALL *PFN_WDFREQUESTRETRIEVEUNSAFEUSERINPUTBUFFER)(
1322 WdfRequestRetrieveUnsafeUserInputBuffer(
1344 (
STDCALL *PFN_WDFREQUESTRETRIEVEUNSAFEUSEROUTPUTBUFFER)(
1361 WdfRequestRetrieveUnsafeUserOutputBuffer(
1382 (
STDCALL *PFN_WDFREQUESTSETINFORMATION)(
1394 WdfRequestSetInformation(
1411 (
STDCALL *PFN_WDFREQUESTGETINFORMATION)(
1421 WdfRequestGetInformation(
1436 (
STDCALL *PFN_WDFREQUESTGETFILEOBJECT)(
1446 WdfRequestGetFileObject(
1462 (
STDCALL *PFN_WDFREQUESTPROBEANDLOCKUSERBUFFERFORREAD)(
1479 WdfRequestProbeAndLockUserBufferForRead(
1501 (
STDCALL *PFN_WDFREQUESTPROBEANDLOCKUSERBUFFERFORWRITE)(
1518 WdfRequestProbeAndLockUserBufferForWrite(
1539 (
STDCALL *PFN_WDFREQUESTGETREQUESTORMODE)(
1549 WdfRequestGetRequestorMode(
1565 (
STDCALL *PFN_WDFREQUESTFORWARDTOIOQUEUE)(
1578 WdfRequestForwardToIoQueue(
1595 (
STDCALL *PFN_WDFREQUESTGETIOQUEUE)(
1605 WdfRequestGetIoQueue(
1621 (
STDCALL *PFN_WDFREQUESTREQUEUE)(
1647 (
STDCALL *PFN_WDFREQUESTSTOPACKNOWLEDGE)(
1659 WdfRequestStopAcknowledge(
1676 (
STDCALL *PFN_WDFREQUESTWDMGETIRP)(
1686 WdfRequestWdmGetIrp(
1701 (
STDCALL *PFN_WDFREQUESTISRESERVED)(
1711 WdfRequestIsReserved(
1727 (
STDCALL *PFN_WDFREQUESTFORWARDTOPARENTDEVICEIOQUEUE)(
1742 WdfRequestForwardToParentDeviceIoQueue(
1764 #endif // (NTDDI_VERSION >= NTDDI_WIN2K) 1769 #endif // _WDFREQUEST_H_
_Must_inspect_result_ _IRQL_requires_max_(DISPATCH_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFREQUESTCREATE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
_In_ WDFREQUEST _In_ PFN_WDF_REQUEST_CANCEL EvtRequestCancel
FORCEINLINE VOID WDF_REQUEST_SEND_OPTIONS_INIT(_Out_ PWDF_REQUEST_SEND_OPTIONS Options, _In_ ULONG Flags)
union _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3675::@3680 Argument2
FORCEINLINE VOID WDF_REQUEST_REUSE_PARAMS_SET_NEW_IRP(_Inout_ PWDF_REQUEST_REUSE_PARAMS Params, _In_ PIRP NewIrp)
#define _Must_inspect_result_
_Must_inspect_result_ WDFAPI BOOLEAN(STDCALL * PFN_WDFREQUESTSEND)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals, _In_ WDFREQUEST Request, _In_ WDFIOTARGET Target, _In_opt_ PWDF_REQUEST_SEND_OPTIONS Options)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t _Outptr_result_bytebuffer_ Length PVOID _Out_opt_ size_t * Length
_WDF_REQUEST_SEND_OPTIONS_FLAGS
union _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3675::@3679 Argument1
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE _In_opt_ __drv_aliasesMem WDFCONTEXT CompletionContext
ULONG POINTER_ALIGNMENT IoControlCode
_Must_inspect_result_ _In_ WDFREQUEST _Outptr_ PMDL * Mdl
_Must_inspect_result_ _In_ WDFREQUEST _In_ WDFQUEUE _In_ PWDF_REQUEST_FORWARD_OPTIONS ForwardOptions
EVT_WDF_REQUEST_CANCEL * PFN_WDF_REQUEST_CANCEL
_WDF_REQUEST_STOP_ACTION_FLAGS
FORCEINLINE VOID WDF_REQUEST_FORWARD_OPTIONS_INIT(_Out_ PWDF_REQUEST_FORWARD_OPTIONS ForwardOptions)
_In_ WDFREQUEST _In_ PWDF_REQUEST_REUSE_PARAMS ReuseParams
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES RequestAttributes
struct _WDF_REQUEST_PARAMETERS WDF_REQUEST_PARAMETERS
struct _WDF_REQUEST_COMPLETION_PARAMS * PWDF_REQUEST_COMPLETION_PARAMS
struct _WDF_USB_REQUEST_COMPLETION_PARAMS * PWDF_USB_REQUEST_COMPLETION_PARAMS
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t _Outptr_result_bytebuffer_maybenull_ Length PVOID * InputBuffer
enum _WDF_REQUEST_STOP_ACTION_FLAGS WDF_REQUEST_STOP_ACTION_FLAGS
ULONG POINTER_ALIGNMENT EaLength
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t MinimumRequiredLength
#define _Outptr_result_bytebuffer_maybenull_(size)
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t _Outptr_result_bytebuffer_maybenull_ Length PVOID * OutputBuffer
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PIRP Irp
enum _WDF_REQUEST_SEND_OPTIONS_FLAGS WDF_REQUEST_SEND_OPTIONS_FLAGS
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t MinimumRequiredSize
#define WDF_EXTERN_C_START
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
PIO_SECURITY_CONTEXT SecurityContext
PWDF_USB_REQUEST_COMPLETION_PARAMS Completion
struct _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3672 Write
_In_ WDFREQUEST _In_ NTSTATUS _In_ CCHAR PriorityBoost
_Must_inspect_result_ _In_ WDFREQUEST _In_reads_bytes_(Length) PVOID Buffer
struct _WDF_REQUEST_SEND_OPTIONS WDF_REQUEST_SEND_OPTIONS
_In_ PWDFDEVICE_INIT _In_ PWDF_OBJECT_ATTRIBUTES RequestAttributes
size_t POINTER_ALIGNMENT InputBufferLength
struct _WDF_REQUEST_SEND_OPTIONS * PWDF_REQUEST_SEND_OPTIONS
FORCEINLINE VOID WDF_REQUEST_REUSE_PARAMS_INIT(_Out_ PWDF_REQUEST_REUSE_PARAMS Params, _In_ ULONG Flags, _In_ NTSTATUS Status)
struct _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3675 Others
struct _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3673 Read
USHORT POINTER_ALIGNMENT FileAttributes
#define _IRQL_requires_same_
EVT_WDF_REQUEST_COMPLETION_ROUTINE * PFN_WDF_REQUEST_COMPLETION_ROUTINE
size_t OutputBufferLength
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
#define POINTER_ALIGNMENT
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
FORCEINLINE VOID WDF_REQUEST_COMPLETION_PARAMS_INIT(_Out_ PWDF_REQUEST_COMPLETION_PARAMS Params)
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
ULONG POINTER_ALIGNMENT Key
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
_Must_inspect_result_ _In_ ULONG Flags
struct _WDF_REQUEST_FORWARD_OPTIONS WDF_REQUEST_FORWARD_OPTIONS
struct _WDF_REQUEST_REUSE_PARAMS WDF_REQUEST_REUSE_PARAMS
enum _WDF_REQUEST_TYPE WDF_REQUEST_TYPE
union _WDF_REQUEST_PARAMETERS::@3665 Parameters
_In_ WDFREQUEST _In_ NTSTATUS Status
struct _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3676 Usb
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t _Outptr_result_bytebuffer_ Length PVOID * Buffer
struct _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3674::@3678 Output
#define _Outptr_result_bytebuffer_(s)
union _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3675::@3682 Argument4
_In_ WDFREQUEST _In_ BOOLEAN Requeue
struct _WDF_REQUEST_PARAMETERS * PWDF_REQUEST_PARAMETERS
WDF_EXTERN_C_START enum _WDF_REQUEST_REUSE_FLAGS WDF_REQUEST_REUSE_FLAGS
_Must_inspect_result_ _In_ WDFREQUEST _In_ size_t _Out_ WDFMEMORY * MemoryObject
_Must_inspect_result_ FORCEINLINE BOOLEAN WdfRequestSend(_In_ WDFREQUEST Request, _In_ WDFIOTARGET Target, _In_opt_ PWDF_REQUEST_SEND_OPTIONS Options)
struct _WDF_REQUEST_COMPLETION_PARAMS WDF_REQUEST_COMPLETION_PARAMS
struct _WDF_REQUEST_PARAMETERS::@3665::@3669 DeviceIoControl
struct _WDF_REQUEST_PARAMETERS::@3665::@3667 Read
enum _WDF_REQUEST_FORWARD_OPTIONS_FLAGS WDF_REQUEST_FORWARD_OPTIONS_FLAGS
typedef _Function_class_(EVT_WDF_REQUEST_CANCEL) _IRQL_requires_same_ _IRQL_requires_max_(DISPATCH_LEVEL) VOID STDCALL EVT_WDF_REQUEST_CANCEL(_In_ WDFREQUEST Request)
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_opt_ WDFIOTARGET IoTarget
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
_Must_inspect_result_ _In_ WDFREQUEST _In_ WDFQUEUE ParentDeviceQueue
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PIRP _In_ BOOLEAN RequestFreesIrp
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
FORCEINLINE VOID WDF_REQUEST_PARAMETERS_INIT(_Out_ PWDF_REQUEST_PARAMETERS Parameters)
struct _WDF_REQUEST_REUSE_PARAMS * PWDF_REQUEST_REUSE_PARAMS
struct _WDF_REQUEST_PARAMETERS::@3665::@3666 Create
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIOTARGET * IoTarget
_Must_inspect_result_ _In_ WDFREQUEST _In_ WDFQUEUE DestinationQueue
#define RtlZeroMemory(Destination, Length)
union _WDF_REQUEST_COMPLETION_PARAMS::@3671 Parameters
_In_ WDFREQUEST _Out_ PWDF_REQUEST_PARAMETERS Parameters
struct _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3674 Ioctl
FORCEINLINE VOID WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT(_Inout_ PWDF_REQUEST_SEND_OPTIONS Options, _In_ LONGLONG Timeout)
struct _WDF_REQUEST_FORWARD_OPTIONS * PWDF_REQUEST_FORWARD_OPTIONS
struct _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3674::@3677 Input
union _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3675::@3681 Argument3
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_opt_ WDFIOTARGET _Out_ WDFREQUEST * Request
_Must_inspect_result_ _In_ WDFREQUEST _Out_ WDFMEMORY * Memory
struct _WDF_REQUEST_PARAMETERS::@3665::@3670 Others
_WDF_REQUEST_FORWARD_OPTIONS_FLAGS
struct _WDF_REQUEST_PARAMETERS::@3665::@3668 Write