// wdfrequest.h
typedef enum _WDF_REQUEST_SEND_OPTIONS_FLAGS {
WDF_REQUEST_SEND_OPTION_TIMEOUT = 0x00000001,
WDF_REQUEST_SEND_OPTION_SYNCHRONOUS = 0x00000002,
WDF_REQUEST_SEND_OPTION_IGNORE_TARGET_STATE = 0x00000004,
WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET = 0x00000008,
WDF_REQUEST_SEND_OPTION_IMPERSONATE_CLIENT = 0x00010000,
WDF_REQUEST_SEND_OPTION_IMPERSONATION_IGNORE_FAILURE = 0x00020000
} WDF_REQUEST_SEND_OPTIONS_FLAGS;
View the official Windows Driver Kit DDI reference
// wudfddi_types.h
typedef enum _WDF_REQUEST_SEND_OPTIONS_FLAGS {
WDF_REQUEST_SEND_OPTION_TIMEOUT,
WDF_REQUEST_SEND_OPTION_SYNCHRONOUS,
WDF_REQUEST_SEND_OPTION_IGNORE_TARGET_STATE,
WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET,
WDF_REQUEST_SEND_OPTION_IMPERSONATE_CLIENT,
WDF_REQUEST_SEND_OPTION_IMPERSONATION_IGNORE_FAILURE
} WDF_REQUEST_SEND_OPTIONS_FLAGS;
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF and UMDF]
The WDF_REQUEST_SEND_OPTIONS_FLAGS enumeration type defines flags that are used in a driver's WDF_REQUEST_SEND_OPTIONS structure.
WDF_REQUEST_SEND_OPTION_TIMEOUT:0x00000001
If the driver sets this flag, the Timeout member of the WDF_REQUEST_SEND_OPTIONS structure is valid.
WDF_REQUEST_SEND_OPTION_SYNCHRONOUS:0x00000002
If the driver sets this flag, the framework handles the associated I/O request synchronously. (The driver does not have to set this flag if it is calling an object method whose name ends with "Synchronously", such as WdfIoTargetSendReadSynchronously.)
WDF_REQUEST_SEND_OPTION_IGNORE_TARGET_STATE:0x00000004
If the driver sets this flag, the framework sends the I/O request to the I/O target, regardless of the I/O target's state. If not set, the framework queues the request if the target is stopped. Setting this flag allows a driver to send a request, such as a request to reset a USB pipe, to a device after the driver has called WdfIoTargetStop.
WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET:0x00000008
If the driver sets this flag, the driver is sending the request asynchronously and does not need to be notified when the request is completed or canceled. The framework sends the I/O request to the I/O target, regardless of the I/O target's state. The driver does not set a CompletionRoutine callback function or call WdfRequestComplete for the request. If the driver sets this flag, it cannot set any other flags. For more information about this flag, see the following Remarks section.
WDF_REQUEST_SEND_OPTION_IMPERSONATE_CLIENT:0x00010000
This flag applies to UMDF only. If set, and if the I/O request type is WdfRequestTypeCreate, the WdfRequestSend method attempts to pass the client's impersonation level to the driver's I/O target. The WdfRequestSend method returns an error code if the impersonation attempt fails, unless the driver also sets the WDF_REQUEST_SEND_OPTION_IMPERSONATION_IGNORE_FAILURE flag.
WDF_REQUEST_SEND_OPTION_IMPERSONATION_IGNORE_FAILURE:0x00020000
This flag applies to UMDF only. If set, the framework still sends the request even if impersonation fails. You can use this value only with WDF_REQUEST_SEND_OPTION_IMPERSONATE_CLIENT.
A driver that sets the WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET flag typically does not format the I/O request before it calls WdfRequestSend to send the request to an I/O target. In fact, a driver that sets this flag must not call any of the WdfIoTargetFormatRequestForXxx methods before it calls WdfRequestSend. The driver can use only the WdfRequestFormatRequestUsingCurrentType or WdfRequestWdmFormatUsingStackLocation method to format the request.
Your driver cannot set the WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET flag in the following situations:
For the UMDF version of this enumeration, see WDF_REQUEST_SEND_OPTIONS_FLAGS (UMDF).
[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]
The WDF_REQUEST_SEND_OPTIONS_FLAGS enumeration type defines flags that a driver can specify when it calls IWDFIoRequest::Send.
WDF_REQUEST_SEND_OPTION_TIMEOUT
If set, the Timeout parameter of the IWDFIoRequest::Send method is valid.
WDF_REQUEST_SEND_OPTION_SYNCHRONOUS
If set, UMDF sends the I/O request synchronously.
WDF_REQUEST_SEND_OPTION_IGNORE_TARGET_STATE
If set, UMDF sends the I/O request to the I/O target, regardless of the I/O target's state. If not set, UMDF queues the request if the target is stopped. Setting this flag allows a driver to send a request, such as a request to reset a USB pipe, to a device after the driver has called IWDFIoTargetStateManagement::Stop.
WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET
If set, the driver is sending the request asynchronously and does not need to be notified when the request is completed or canceled. The driver does not set an IRequestCallbackRequestCompletion::OnCompletion callback function or call IWDFIoRequest::Complete for the request. For more information about this flag, see the following Remarks section.
WDF_REQUEST_SEND_OPTION_IMPERSONATE_CLIENT
If set, and if the I/O request type is WdfRequestCreate, the Send method attempts to pass the client's impersonation level to the driver's I/O target. This value is available in UMDF versions 1.9 and later.
WDF_REQUEST_SEND_OPTION_IMPERSONATION_IGNORE_FAILURE
If set, UMDF ignores impersonation failures. You can use this value only with WDF_REQUEST_SEND_OPTION_IMPERSONATE_CLIENT. This value is available in UMDF versions 1.9 and later.
A driver that sets the WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET flag typically does not format the I/O request before it calls IWDFIoRequest::Send to send the request to an I/O target. In fact, a driver that sets this flag must not call any of the IWdfIoTarget::FormatRequestForXxx methods before it calls IWDFIoRequest::Send. The driver can use only the IWDFIoRequest::FormatUsingCurrentType method to format the request.
Your driver cannot set the WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET flag if the pIoTarget parameter of IWDFIoRequest::Send points to a file-handle-based I/O target object. For more information about this type of I/O target, see Initializing a General I/O Target in UMDF.
If the driver sets the WDF_REQUEST_SEND_OPTION_SEND_AND_FORGET flag, it cannot set any other flags except WDF_REQUEST_SEND_OPTION_IMPERSONATE_CLIENT and WDF_REQUEST_SEND_OPTION_IMPERSONATION_IGNORE_FAILURE.
For more information about client impersonation, see Handling Client Impersonation.
For the KMDF version of this enumeration, see WDF_REQUEST_SEND_OPTIONS_FLAGS.