The IOCTL_DISK_FORMAT_TRACKS DeviceIoControl operation formats a specified, contiguous set of tracks on a disk.
dwIoControlCode = IOCTL_DISK_FORMAT_TRACKS; // operation code lpInBuffer; // address of input buffer nInBufferSize; // size of input buffer lpOutBuffer = NULL; // address of output buffer; not used; must be NULL nOutBufferSize = 0; // size of output buffer; not used; must be zero lpBytesReturned; // address of actual bytes of output
If the operation succeeds, DeviceIoControl returns a nonzero value.
If the operation fails, DeviceIoControl returns zero. To get extended error information, call GetLastError.
This device I/O control operation is for floppy disk devices only.