WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT function
[Applies to KMDF and UMDF]
The WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT function sets a time-out value in a driver's WDF_REQUEST_SEND_OPTIONS structure.
Syntax
VOID WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT( _Inout_ PWDF_REQUEST_SEND_OPTIONS Options, _In_ LONGLONG Timeout );
Parameters
- Options [in, out]
-
A pointer to the driver's WDF_REQUEST_SEND_OPTIONS structure.
- Timeout [in]
-
An absolute or relative time-out value. For more information, see the Timeout member of the WDF_REQUEST_SEND_OPTIONS structure.
Return value
None
Remarks
To set a time-out value, your driver must call WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT after it calls WDF_REQUEST_SEND_OPTIONS_INIT.
The WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT function stores the specified timeout value in the specified WDF_REQUEST_SEND_OPTIONS structure's Timeout member. It also sets the WDF_REQUEST_SEND_OPTION_TIMEOUT flag in the structure's Flags member.
Examples
The following code example initializes a WDF_REQUEST_SEND_OPTIONS structure and sets a time-out value for the structure. (The example calls WDF_REL_TIMEOUT_IN_SEC to specify a relative time-out value of 10 seconds.) The example then uses the WDF_REQUEST_SEND_OPTIONS structure as input to WdfUsbTargetPipeWriteSynchronously.
WDF_REQUEST_SEND_OPTIONS syncReqOptions; WDF_REQUEST_SEND_OPTIONS_INIT( &syncReqOptions, 0 ); WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT( &syncReqOptions, WDF_REL_TIMEOUT_IN_SEC(10) ); status = WdfUsbTargetPipeWriteSynchronously( pipeHandle, NULL, &syncReqOptions, &writeBufDesc, NULL );
Requirements
Minimum KMDF version | 1.0 |
---|---|
Minimum UMDF version | 2.0 |
Header |
|
See also