// ntdddisk.h
typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
ULONG PartitionStyle;
ULONG PartitionCount;
union {
DRIVE_LAYOUT_INFORMATION_MBR Mbr;
DRIVE_LAYOUT_INFORMATION_GPT Gpt;
} DUMMYUNIONNAME;
PARTITION_INFORMATION_EX PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION_EX, *PDRIVE_LAYOUT_INFORMATION_EX;
View the official Windows Driver Kit DDI reference
// winioctl.h
typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
DWORD PartitionStyle;
DWORD PartitionCount;
union {
DRIVE_LAYOUT_INFORMATION_MBR Mbr;
DRIVE_LAYOUT_INFORMATION_GPT Gpt;
} DUMMYUNIONNAME;
PARTITION_INFORMATION_EX PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION_EX, *PDRIVE_LAYOUT_INFORMATION_EX;
View the official Win32 API reference
No description available.
The DRIVE_LAYOUT_INFORMATION_EX structure is used to report information about the driver layout.
PartitionStyle
Takes a PARTITION_STYLE enumerated value that specifies the type of partition table the disk contains.
PartitionCount
Indicates the number of partitions detected on the disk.
DUMMYUNIONNAME
DUMMYUNIONNAME.Mbr
Indicates the drive layout information for a disk with a Master Boot Record. This member is valid when PartitionStyle is PARTITION_STYLE_MBR. See the definition of DRIVE_LAYOUT_INFORMATION_MBR for more information.
DUMMYUNIONNAME.Gpt
Indicates the drive layout information for a disk with a GUID Partition Table. This member is valid when PartitionStyle is PARTITION_STYLE_GPT. See definition of DRIVE_LAYOUT_INFORMATION_GPT for more information.
PartitionEntry
Contains a variable-length array of PARTITION_INFORMATION_EX structures, one for each partition on the drive.
This structure is used for both reading and writing disk partition information. It is used with IoReadPartitionTableEx and IoWritePartitionTableEx and replaces the obsolete structure DRIVE_LAYOUT_INFORMATION that was used with IoReadPartitionTable and IoWritePartitionTable. The principal difference is that the new structures and routines support both Master Boot Record (MBR) partitions and GUID Partition Table (GPT) partitions, whereas the older routines and structures are only used with MBR partitions.
Contains extended information about a drive's partitions.
PartitionStyle
The style of the partitions on the drive enumerated by the PARTITION_STYLE enumeration.
Style | Value | Meaning |
---|---|---|
PARTITION_STYLE_MBR | 0 | Master boot record (MBR) format. |
PARTITION_STYLE_GPT | 1 | GUID Partition Table (GPT) format. |
PARTITION_STYLE_RAW | 2 | Partition not formatted in either of the recognized formats—MBR or GPT. |
PartitionCount
The number of partitions on the drive. On hard disks with the MBR layout, this value will always be a multiple of 4. Any partitions that are actually unused will have a partition type of PARTITION_ENTRY_UNUSED (0) set in the PartitionType member of the PARTITION_INFORMATION_MBR structure of the Mbr member of the PARTITION_INFORMATION_EX structure of the PartitionEntry member of this structure.
DUMMYUNIONNAME
DUMMYUNIONNAME.Mbr
A DRIVE_LAYOUT_INFORMATION_MBR structure containing information about the master boot record type partitioning on the drive.
DUMMYUNIONNAME.Gpt
A DRIVE_LAYOUT_INFORMATION_GPT structure containing information about the GUID disk partition type partitioning on the drive.
PartitionEntry
A variable-sized array of PARTITION_INFORMATION_EX structures, one structure for each partition on the drive.
DRIVE_LAYOUT_INFORMATION_GPT, DRIVE_LAYOUT_INFORMATION_MBR, IOCTL_DISK_GET_DRIVE_LAYOUT_EX, IOCTL_DISK_SET_DRIVE_LAYOUT_EX, PARTITION_INFORMATION_EX, PARTITION_INFORMATION