Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Other versions of this page are also available for the following:
8/28/2008
This I/O control is issued to the FAT to be formatted to perform a high-level format of the volume.
- hDevice
[in] Handle to the block device.
- dwIoControlCode
[in] Specifies this I\O control.
- lpInBuffer
Not used.
- nInBufferSize
Not used.
- lpOutBuffer
Not used.
- nOutBufferSize
Not used.
- lpBytesReturned
[out] Pointer to a DWORD to receive the total number of bytes returned.
- lpOverlapped
Not used.
TRUE indicates success. FALSE indicates failure.
The following steps describe how to format a drive:
Open a handle to the volume.
The name of the volume to open has the format \FolderName\Vol:, where FolderName is the FAT file system name for the root directory of the mounted volume.Call the DeviceIoControl function with the volume handle and this I/O control.
The following code example shows this procedure.hVolume = CreateFile(TEXT("\Storage Card\Vol:"), GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); DeviceIoControl(hVolume, IOCTL_DISK_FORMAT_VOLUME, NULL, 0, NULL, 0, NULL, NULL);
Header | diskio.h |
Windows Embedded CE | Windows CE 3.0 and later |