IOCTL_DISK_SETINFO (Compact 2013)
3/26/2014
This I/O control message services FAT file system requests to set disk information. Send this message with DeviceIoControl.
Syntax
BOOL DeviceIoControl(
HANDLE hDevice, // handle to device
DWORD dwIoControlCode, // use IOCTL_DISK_SETINFO
LPVOID lpInBuffer, // pointer to input buffer
DWORD nInBufferSize, // input buffer size
LPVOID lpOutBuffer, // pointer to output buffer
DWORD nOutBufferSize, // output buffer size
LPDWORD lpBytesReturned, // number of bytes returned
OVERLAPPED lpOverlapped // pointer to OVERLAPPED structure
);
Parameters
- hDevice
[in] Handle to the device.
- dwIoControlCode
[in] Control code for the operation. Use IOCTL_DISK_SETINFO for this operation.
- lpInBuffer
[in] Pointer to a DISK_INFO structure.
- nInBufferSize
[in] Specifies the size of the DISK_INFO structure in lpInBuffer.
- lpOutBuffer
Not used. Set to NULL.
- nOutBufferSize
Not used. Set to zero.
- lpBytesReturned
Pointer to a DWORD to receive total bytes returned.
- lpOverlapped
Not used.
Return Values
Returns TRUE if successful; otherwise, returns FALSE.
Remarks
To get extended error information, call GetLastError. GetLastError may return other standard error messages as appropriate.
Remarks
The FAT file system fills a DISK_INFO structure because it expects the block driver to fill the structure for the IOCTL_DISK_GETINFO I/O control. This I/O control informs the block driver of discrepancies in the disk information that the block driver provides to the FAT file system, according to information found on the device media, such as in the MBR of a FAT file system volume. It may not always be possible for a driver to accurately determine the sector size or total number of sectors on a volume. If so, the file system driver must identify and attempt to correct the discrepancy.
Requirements
Header |
diskio.h |
See Also
Reference
Block Driver IOCTLs
DeviceIoControl
DISK_INFO
IOCTL_DISK_GETINFO