Развернуть Свернуть

WdfRequestWdmGetIrp method

[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

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

Requirements

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

See also

WdfRequestGetParameters

 

 

Send comments about this topic to Microsoft

Показ:
© 2014 Microsoft