IoGetCurrentIrpStackLocation

PIO_STACK_LOCATION
IoGetCurrentIrpStackLocation(

IN PIRP Irp
);

IoGetCurrentIrpStackLocation returns a pointer to the caller's stack location in the given IRP.

Parameters

Irp

Points to the IRP.

Return Value

The routine returns a pointer to the I/O stack location for the driver.

Comments

Every driver must call IoGetCurrentIrpStackLocation with each IRP it is sent in order to get any parameters for the current request. Unless a driver supplies a Dispatch routine for each IRP_MJ_XXX that driver handles, the driver also must check its I/O stack location in the IRP to determine what operation is being requested.

Intermediate and highest-level drivers also call IoGetCurrentIrpStackLocation so that they can copy pertinent data from their own stack location into that of the next-lower driver whenever they pass a request on to lower drivers.

See Also

IO_STACK_LOCATION, IoCallDriver, IoGetNextIrpStackLocation, IoSetNextIrpStackLocation