IOCTL_DISK_GET_DRIVE_LAYOUT_EX IOCTL (winioctl.h)
Retrieves extended information for each entry in the partition tables for a disk.
To perform this operation, call the DeviceIoControl function with the following parameters. You must have read access to the drive in order to use this control code.
BOOL DeviceIoControl(
(HANDLE) hDevice, // handle to device
IOCTL_DISK_GET_DRIVE_LAYOUT_EX, // dwIoControlCode
NULL, // lpInBuffer
0, // nInBufferSize
(LPVOID) lpOutBuffer, // output buffer
(DWORD) nOutBufferSize, // size of output buffer
(LPDWORD) lpBytesReturned, // number of bytes returned
(LPOVERLAPPED) lpOverlapped // OVERLAPPED structure
);
Remarks
This operation retrieves information for each primary partition as well as each logical drive. To determine whether the entry is an extended or unused partition, check the Disk Partition Types.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | winioctl.h (include Windows.h) |