IOCTL_DISK_WRITE (Windows CE 5.0)
This IOCTL services FAT file system requests to write data to the block device. The DeviceIoControl function processes this IOCTL.
[in] Handle to the block device.
[in] Specifies this IOCTL.
[in] Pointer to an SG_REQ structure.
[in] Specifies the size of SG_REQ.
[out] Pointer to a DWORD to receive total number of bytes returned.
When this code returns, the FAT file system expects the **sr_status****member of SG_REQ to be ERROR_SUCCESS if the write succeeded, or a standard error return value. Certain errors retry automatically. ERROR_BAD_UNIT retries automatically if you remove the device, and ERROR_NOT_READY retries automatically 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 should return ERROR_WRITE_PROTECT for attempts to write to write-protected media.
In Windows CE 3.0, this IOCTL was changed from DISK_IOCTL_WRITE to IOCTL_DISK_WRITE.
This IOCTL call into the block driver is relative to the object store; the object store is the media that the block driver exposes. This also implies that this IOCTL call is relative to the MBR, but block drivers should not make assumptions on the existence of an MBR.
OS Versions: Windows CE 3.0 and later.
Send Feedback on this topic to the authors