DISK_IOCTL_GETINFO
Block device drivers respond to this I/O control code to return disk information.
Parameters
- hDevice
- Handle to the block device.
- dwIoControlCode
- DISK_IOCTL_GETINFO
- lpInBuffer
- Address of a DISK_INFO structure
- nInBufferSize
- Set to the size of the DISK_INFO structure
- lpOutBuffer
- Not used.
- nOutBufferSize
- Not used.
- lpBytesReturned
- Address of a DWORD to receive total bytes returned.
- lpOverlapped
- Not used.
Remarks
On return, the DISK_INFO structure parameters must be filled in with the following information:
- di_total_sectors
- Total number of blocks on the device
- di_bytes_per_sector
- Size of a block, in bytes. Values other than 512 are currently not supported.
- di_cylinders
- If the device supports CHS (cylinder/head/sector) addressing, the driver may report the number of cylinders here. However, the FAT file system does not depend on this information.
- di_heads
- If the device supports CHS addressing, the driver may report the number of heads per cylinder here. However, the FAT file system does not depend on this information.
- di_sectors
- If the device supports CHS addressing, the driver may report the number of sectors per track here. However, the FAT file system does not depend on this information.
- di_flags
- Contains zero or more of the following:
- DISK_INFO_FLAG_MBR
- The device has or needs a Master Boot Record (MBR).
- DISK_INFO_FLAG_CHS_UNCERTAIN
- The device does not support CHS addressing; values for di_cylinders/di_heads/di_sectors may be simulated, estimated, or not provided.
- DISK_INFO_FLAG_UNFORMATTED
- The device requires a low-level format; the FAT file system currently ignores this flag.
- DISK_INFO_FLAG_PAGEABLE
- The device supports demand paging; read and write requests are synchronous and do not involve any memory manager calls, loader operations, or thread switches.