WdfRequestWdmGetIrp - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfrequest.h

PIRP WdfRequestWdmGetIrp(
  [in] WDFREQUEST Request
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfrequest-wdfrequestwdmgetirp)

WdfRequestWdmGetIrp function

Description

[Applies to KMDF only]

The WdfRequestWdmGetIrp method returns the WDM IRP structure that is associated with a specified framework request object.

Parameters

Request [in]

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

See also

WdfRequestGetParameters