WdfRequestWdmGetIrp function (wdfrequest.h)
[Applies to KMDF only]
The WdfRequestWdmGetIrp method returns the WDM IRP structure that is associated with a specified framework request object.
Syntax
PIRP WdfRequestWdmGetIrp(
[in] WDFREQUEST Request
);
Parameters
[in] Request
A handle to a framework request object.
Return value
WdfRequestWdmGetIrp returns a pointer to an IRP structure.
A bug check occurs if the driver supplies an invalid object handle.
Remarks
The driver must not access a request's IRP structure after completing the I/O request.
For more information about WdfRequestWdmGetIrp, see Obtaining Information About an I/O Request.
Examples
The following code example is part of an EvtIoDeviceControl callback function that obtains the WDM IRP that is associated with an I/O request and then calls IoGetNextIrpStackLocation to obtain the next-lower driver's I/O stack location.
VOID
MyEvtIoDeviceControl(
IN WDFQUEUE Queue,
IN WDFREQUEST Request,
IN size_t OutputBufferLength,
IN size_t InputBufferLength,
IN ULONG IoControlCode
)
{
PIRP irp = NULL;
PIO_STACK_LOCATION nextStack;
...
irp = WdfRequestWdmGetIrp(Request);
nextStack = IoGetNextIrpStackLocation(irp);
...
}
Requirements
Requirement | Value |
---|---|
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(kmdf), InvalidReqAccess(kmdf), InvalidReqAccessLocal(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf) |