IOCTL_DISK_READ (Windows Embedded CE 6.0)

1/6/2010

This IOCTL services FAT file system requests to read data from the block device. The DeviceIoControl function processes this IOCTL.

Parameters

  • hDevice
    [in] Handle to the block device.
  • dwIoControlCode
    [in] Specifies this IOCTL.
  • lpInBuffer
    [in] Pointer to a SG_REQ structure.
  • nInBufferSize
    [in] Specifies the size of the SG_REQ structure.
  • lpOutBuffer
    Not used.
  • nOutBufferSize
    Not used.
  • lpBytesReturned
    [out] Pointer to a DWORD to receive total bytes returned. Set to NULL if you do not need to return this value.
  • lpOverlapped
    Not used.

Return Values

When this function returns, the FAT file system expects the sr_statusmember of SG_REQ to receive ERROR_SUCCESS if the read succeeded; otherwise, it receives a standard error return value. Certain errors retry automatically. For example, ERROR_BAD_UNIT retries automatically if you remove the device, and ERROR_NOT_READY retries automatically if the driver is shutting down or starting up. Block device drivers should return ERROR_GEN_FAILURE for any unknown or unexpected errors.

Remarks

In Windows CE 3.0, this IOCTL was changed from DISK_IOCTL_READ to IOCTL_DISK_READ.

This IOCTL call into the block driver is relative to the object store; the object store is the medium that the block driver exposes. This also implies that this IOCTL call is relative to the master boot record (MBR), but block drivers should not make assumptions on the existence of an MBR.

Requirements

Header diskio.h
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Block Driver IOCTLs
DeviceIoControl
SG_REQ

Other Resources

Block Drivers