Previous Next

IoCopyCurrentIrpStackLocationToNext

The IoCopyCurrentIrpStackLocationToNext routine copies the IRP stack parameters from the current I/O stack location to the stack location of the next-lower driver and allows the current driver to set an I/O completion routine.

VOID 
  IoCopyCurrentIrpStackLocationToNext(
    IN PIRP  Irp
    );

Parameters

Irp
Pointer to the IRP.

Return Value

None

Headers

Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.

Comments

A driver calls IoCopyCurrentIrpStackLocationToNext to copy the IRP parameters from its stack location to the next-lower driver’s stack location.

After calling this routine, a driver typically sets an I/O completion routine with IoSetCompletionRoutine before passing the IRP to the next-lower driver with IoCallDriver. Drivers that pass on their IRP parameters but do not set an I/O completion routine should call IoSkipCurrentIrpStackLocation instead of this routine.

Callers of IoCopyCurrentIrpStackLocationToNext must be running at IRQL <= DISPATCH_LEVEL.

See Also

IO_STACK_LOCATION, IoCallDriver, IoSetCompletionRoutine, IoSkipCurrentIrpStackLocation