typedef struct _IO_STATUS_BLOCK {
NTSTATUS Status;
ULONG Information;
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
The I/O status block in the IRP is set to indicate the final status of a given request before a driver calls IoCompleteRequest with the IRP.
Members
Status
Is the completion status, either STATUS_SUCCESS if the requested operation was completed successfully or an informational, warning, or error STATUS_XXX value.
Information
Is set to a request-dependent value. For example, on successful completion of a transfer request, this is set to the number of bytes transferred. If a transfer request is completed with another STATUS_XXX, this member is set to zero. See Part II of this manual for more request-specific information.
Comments
Unless a driver completes an IRP with an error from its Dispatch routine for that IRP_MJ_XXX, the lowest-level driver in the chain frequently sets the I/O status block in an IRP to the values that are returned to the original requestor of the I/O operation.
The IoCompletion routine(s) of higher-level drivers usually check the I/O status block in IRPs completed by lower drivers. By design, the I/O status block in an IRP is the only information passed back from the underlying device driver to all higher-level drivers’ IoCompletion routines.
See Also
IO_STACK_LOCATION, IoCompleteRequest, IoSetCompletionRoutine, IRP