Skip to content

Latest commit

 

History

History
101 lines (76 loc) · 4.38 KB

nf-wdfrequest-wdf_request_send_options_set_timeout.md

File metadata and controls

101 lines (76 loc) · 4.38 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:wdfrequest.WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT
WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT function (wdfrequest.h)
The WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT function sets a time-out value in a driver's WDF_REQUEST_SEND_OPTIONS structure.
wdf\wdf_request_send_options_set_timeout.htm
wdf
02/26/2018
WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT function
DFRequestObjectRef_bcbdd786-6d81-45f7-a70b-96e781da0d36.xml, WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT, WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT function, kmdf.wdf_request_send_options_set_timeout, wdf.wdf_request_send_options_set_timeout, wdfrequest/WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT
wdfrequest.h
Wdf.h
Universal
1.0
2.0
Windows
WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT
wdfrequest/WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT
APIRef
kbSyntax
HeaderDef
wdfrequest.h
WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT

WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT function

-description

[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.

-parameters

-param Options [in, out]

A pointer to the driver's WDF_REQUEST_SEND_OPTIONS structure.

-param Timeout [in]

An absolute or relative time-out value. For more information, see the Timeout member of the WDF_REQUEST_SEND_OPTIONS structure.

-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
                                            );

-see-also

WDF_REQUEST_SEND_OPTIONS

WDF_REQUEST_SEND_OPTIONS_INIT