PIRP
IoMakeAssociatedIrp(
IN PIRP Irp,
IN CCHAR StackSize
);
IoMakeAssociatedIrp allocates and initalizes an IRP to be associated with a master IRP sent to a highest-level driver, allowing the caller to split the original request and send associated IRPs on to lower-level drivers.
IoMakeAssociatedIrp returns a pointer to the associated IRP or returns a NULL pointer if an IRP cannot be allocated.
Only a highest-level driver can call this routine.
The I/O Manager completes the master IRP automatically when lower drivers have completed all associated IRPs as long as the caller has not set its IoCompletion routine in an associated IRP and returned STATUS_MORE_PROCESSING_REQUIRED from its IoCompletion routine. In these circumstances, the caller must explicitly complete the master IRP when that driver has determined that all associated IRPs were completed.
Callers of IoMakeAssociatedIrp must be running at IRQL <= DISPATCH_LEVEL.
IoAllocateIrp, IoBuildAsynchronousFsdRequest, IoBuildDeviceIoControlRequest, IoBuildSynchronousFsdRequest, IoCallDriver, IoSetCompletionRoutine, IRP