Block device drivers respond to this I/O control code in order to service FAT file system requests to write data to the block device.
When this function returns, the FAT file system expects the sr_status member of the SG_REQ structure to be set to either ERROR_SUCCESS if the write succeeded, or a standard Win32 error code otherwise. Certain errors are automatically retried, such as ERROR_BAD_UNIT if the device has been removed and ERROR_NOT_READY if the driver is in the process of shutting down or starting up. The block device driver should return ERROR_GEN_FAILURE for any unknown or unexpected errors, and ERROR_WRITE_PROTECT for attempts to write to media that is write-protected.
The FAT file system fills in the SG_REQ structure passed to the block device driver as follows:
If sr_num_sg is greater than 1, then the block device driver should fill in additional entries in the sr_sglist array.