Microsoft Windows CE 3.0  

IOCTL_DISK_READ

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Block device drivers respond to this I/O control code in order to service FAT file system requests to read data from the block device.

Parameters

hDevice
Handle to the block device.
dwIoControlCode
Specifies this code.
lpInBuffer
Pointer to an SG_REQstructure..
nInBufferSize
Specifies the size of the SG_REQstructure.
lpOutBuffer
Not used.
nOutBufferSize
Not used.
lpBytesReturned
Pointer to a DWORDto receive total bytes returned.
lpOverlapped
Not used.

Return Values

When this function returns, the FAT file system expects the sr_statusmember of SG_REQto be set to either ERROR_SUCCESS if the read succeeded, or a standard error return value, 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 shutting down or starting up. Block device drivers should return ERROR_GEN_FAILURE for any unknown or unexpected errors.

Remarks

In Windows CE versions prior to 3.0, this code was called DISK_IOCTL_READ. The FAT file system fills in the SG_REQstructure passed to the block device driver as follows:

sr_start
Starting block number.
sr_num_sec
Number of blocks to read.
sr_num_sg
Number of scatter or gather buffers, normally 1.
sr_callback
NULL.
sr_sglist[0].sb_buf
Pointer to the buffer to read blocks into. This buffer is unaligned.
sr_sglist[0].sb_len
Specifies the size of the sr_sglist[0].sb_bufbuffer, in bytes.

If sr_num_sgis greater than 1, the block device driver should fill in additional entries in the sr_sglistarray.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 3.0 and later      
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.


 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.