VOID
IoMarkIrpPending(
IN OUT PIRP Irp
);
IoMarkIrpPending marks the given IRP, indicating that a driver’s Dispatch routine returned STATUS_PENDING because further processing is required by other driver routines.
Unless a driver calls IoCompleteRequest from its Dispatch routine with a given IRP or passes the IRP on to lower drivers, it must call IoMarkIrpPending with the IRP. Otherwise, the I/O Manager attempts to complete the IRP as soon as the Dispatch routine returns control.
A routine that calls IoMarkIrpPending must return STATUS_PENDING.
Callers of IoMarkIrpPending must be running at IRQL <= DISPATCH_LEVEL.