IOCTL_STORAGE_READ_CAPACITY IOCTL (ntddstor.h)
The IOCTL_STORAGE_READ_CAPACITY request returns the read capacity information for the target storage device.
Major code
Input buffer
None.
Input buffer length
None.
Output buffer
The buffer at Irp->AssociatedIrp.SystemBuffer contains a STORAGE_READ_CAPACITY structure.
Output buffer length
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).
Status block
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.
Remarks
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows 8. |
Header | ntddstor.h (include Ntddstor.h) |