IOCTL_STORAGE_READ_CAPACITY control code
The IOCTL_STORAGE_READ_CAPACITY request returns the read capacity information for the target storage device.
The buffer at Irp->AssociatedIrp.SystemBuffer contains a STORAGE_READ_CAPACITY structure.
Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the buffer, which must be at least sizeof(STORAGE_READ_CAPACITY).
The Status field can be set to STATUS_SUCCESS, or possibly to STATUS_INVALID_DEVICE_REQUEST, STATUS_BUFFER_TOO_SMALL, STATUS_BUFFER_OVERFLOW, or some other error status.
A IOCTL_STORAGE_READ_CAPACITY request returns the disk capacity information retrieved during disk initialization. The capacity information is obtained by the system with the SCSI READ CAPACITY command.
|Available starting with Windows 8.|