IOCTL_DISK_FORMAT_MEDIA
This IOCTL is issued by the FAT file system when a device drivers reports that the disk needs a low-level format. The DeviceIoControl function calls this IOCTL.
Parameters
- hDevice
[in] Specifies a block device handle. - dwIoControlCode
[in] Specifies this IOCTL. - lpInBuffer
[in] Set to NULL. - nInBufferSize
[in] Set to zero. - lpOutBuffer
Not used. - nOutBufferSize
Not used. - lpBytesReturned
[out] Pointer to a DWORD to receive the total number of bytes returned. - lpOverlapped
Not used.
Return Values
If returns TRUE, then the IOCTL was successfully processed; otherwise, returns FALSE.
Remarks
In Windows CE 3.0, this IOCTL was changed from DISK_IOCTL_FORMAT_MEDIA to IOCTL_DISK_FORMAT_MEDIA.
A low-level format prepares the medium. For flash devices that contain low-level data structures, the low-level format initializes the flash devices. This format is independent of the file system that resides above the device. The file system format is specific to the file system that is connected, for example, FAT file system or NTFS file system. Block device drivers indicate the format status by setting the di_flags member of the DISK_INFO structure to the DISK_INFO_FLAG_UNFORMATTED flag. The FAT file system will then query the user to determine whether the device should format before issuing the IOCTL_DISK_FORMAT_MEDIA IOCTL.
Requirements
OS Versions: Windows CE 3.0 and later.
Header: Diskio.h.
See Also
Block Drivers | DeviceIoControl | DISK_INFO
Last updated on Tuesday, May 18, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.