WdfRequestWdmFormatUsingStackLocation function
[Applies to KMDF only]
The WdfRequestWdmFormatUsingStackLocation method formats an I/O request by copying the contents of a specified WDM I/O stack location structure to the next stack location in the request.
Syntax
void WdfRequestWdmFormatUsingStackLocation(
WDFREQUEST Request,
PIO_STACK_LOCATION Stack
);
Parameters
Request
A handle to a framework request object.
Stack
A pointer to an IO_STACK_LOCATION structure that contains driver-supplied information.
Return Value
None.
A bug check occurs if the driver supplies an invalid object handle.
Remarks
The WdfRequestWdmFormatUsingStackLocation method copies the information that is supplied by the Stack parameter into the next IRP stack location in the request.
WdfRequestWdmFormatUsingStackLocation formats the request independent of whether the I/O target object of the request is local or remote.
If you want to set a completion routine for the request, your driver must call WdfRequestSetCompletionRoutine after calling WdfRequestWdmFormatUsingStackLocation.
For more information about WdfRequestWdmFormatUsingStackLocation, see Forwarding I/O Requests.
Examples
The following code example supplies an IO_STACK_LOCATION structure for an I/O request, sets a CompletionRoutine callback function, and then sends the request to an I/O target.
IO_STACK_LOCATION ioStackLocation; BOOLEAN sendStatus; ... // // Initialize the IO_STACK_LOCATION structure here. // ... // // Assign the IO_STACK_LOCATION structure to the request. // WdfRequestWdmFormatUsingStackLocation( request, &ioStackLocation ); // // Assign a CompletionRoutine callback function. // WdfRequestSetCompletionRoutine( Request, RequestTimeoutComplete, NULL ); // // Send the request. // sendStatus = WdfRequestSend( Request, target, NULL ); |
Requirements
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Header | wdfrequest.h (include Wdf.h) |
Library | Wdf01000.sys (see Framework Library Versioning.) |
IRQL | "<=DISPATCH_LEVEL" |
DDI compliance rules | DriverCreate, InvalidReqAccess, InvalidReqAccessLocal, KmdfIrql, KmdfIrql2, RequestFormattedValid |