WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT function (wdfrequest.h)
[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(
[in, out] PWDF_REQUEST_SEND_OPTIONS Options,
[in] LONGLONG Timeout
);
Parameters
[in, out] Options
A pointer to the driver's WDF_REQUEST_SEND_OPTIONS structure.
[in] Timeout
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
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Minimum UMDF version | 2.0 |
Header | wdfrequest.h (include Wdf.h) |