IOCTL_DISK_FORMAT_MEDIA (Windows CE 5.0)

Send Feedback

This IOCTL is issued by the FAT file system when a device driver reports that the disk needs a low-level format. The DeviceIoControl function processes 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 the return value is TRUE, then the IOCTL was successfully processed; otherwise, the return value is 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

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.