Windows Driver Kit: Kernel-Mode Driver Architecture
IO_STATUS_BLOCK
A driver sets an IRP's I/O status block to indicate the final status of an I/O request, before calling IoCompleteRequest for the IRP.
typedef struct _IO_STATUS_BLOCK {
union {
NTSTATUS Status;
PVOID Pointer;
};
ULONG_PTR Information;
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
Members
- Status
- This is the completion status, either STATUS_SUCCESS if the requested operation was completed successfully or an informational, warning, or error STATUS_XXX value. For more information, see Using NTSTATUS values.
- Pointer
- Reserved. For internal use only.
- Information
- This 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.
Comments
Unless a driver's dispatch routine completes an IRP with an error status value, the lowest-level driver in the chain frequently sets the IRP's I/O status block to the values that will be returned to the original requester of the I/O operation.
The IoCompletion routines 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.
For more information, see I/O Status Blocks.
Requirements
Headers: Defined in Wdm.h. Include Wdm.h, Ntddk.h, or Ntifs.h.
See Also
IO_STACK_LOCATION, IoCompleteRequest, IoSetCompletionRoutine, IRP