// wdfrequest.h
PIRP WdfRequestWdmGetIrp(
[in] WDFREQUEST Request
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF only]
The WdfRequestWdmGetIrp method returns the WDM IRP structure that is associated with a specified framework request object.
Request
[in]A handle to a framework request object.
WdfRequestWdmGetIrp returns a pointer to an IRP structure.
A bug check occurs if the driver supplies an invalid object handle.
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.
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);
...
}