// ntdddisk.h
typedef struct _PARTITION_INFORMATION_EX {
PARTITION_STYLE PartitionStyle;
LARGE_INTEGER StartingOffset;
LARGE_INTEGER PartitionLength;
ULONG PartitionNumber;
BOOLEAN RewritePartition;
BOOLEAN IsServicePartition;
union {
PARTITION_INFORMATION_MBR Mbr;
PARTITION_INFORMATION_GPT Gpt;
} DUMMYUNIONNAME;
} PARTITION_INFORMATION_EX, *PPARTITION_INFORMATION_EX;
View the official Windows Driver Kit DDI reference// winioctl.h
typedef struct _PARTITION_INFORMATION_EX {
PARTITION_STYLE PartitionStyle;
LARGE_INTEGER StartingOffset;
LARGE_INTEGER PartitionLength;
DWORD PartitionNumber;
BOOLEAN RewritePartition;
BOOLEAN IsServicePartition;
union {
PARTITION_INFORMATION_MBR Mbr;
PARTITION_INFORMATION_GPT Gpt;
} DUMMYUNIONNAME;
} PARTITION_INFORMATION_EX, *PPARTITION_INFORMATION_EX;
View the official Win32 API referenceNo description available.
PARTITION_INFORMATION_EX is the extended version of the PARTITION_INFORMATION structure. It holds information both for partitions with a Master Boot Record and for partitions with a GUID Partition Table.
PartitionStyleTakes a PARTITION_STYLE enumerated value that specifies the type of partition table that contains the partition.
StartingOffsetSpecifies the offset in bytes on drive where the partition begins.
PartitionLengthSpecifies the length in bytes of the partition.
PartitionNumberSpecifies the number of the partition.
RewritePartitionIndicates, when TRUE, that the partition information has changed. When FALSE, the information has not changed. This member has a value of TRUE when the partition has changed as a result of an IOCTL_DISK_SET_DRIVE_LAYOUT IOCTL. This informs the system that the partition information needs to be rewritten.
IsServicePartitionWhen TRUE, indicates that the partition is service.
DUMMYUNIONNAMEDUMMYUNIONNAME.MbrContains a structure of type PARTITION_INFORMATION_MBR containing information specific to a partition with a PartitionStyle member of PARTITION_STYLE_MBR.
DUMMYUNIONNAME.GptContains a structure of type PARTITION_INFORMATION_GPT containing information specific to a partition with a PartitionStyle member of PARTITION_STYLE_GPT.
This is the extended version of the partition information structure, PARTITION_INFORMATION. IoReadPartitionTableEx and IoWritePartitionTableEx operate on an array of PARTITON_INFORMATION_EX structures contained within the extended drive layout structure, DRIVE_LAYOUT_INFORMATION_EX. PARTITION_INFORMATION_EX replaces the structure PARTITION_INFORMATION that was used with IoReadPartitionTable and IoWritePartitionTable. The principle 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 partition information for standard AT-style master boot record (MBR) and Extensible Firmware Interface (EFI) disks.
PartitionStyleThe format of the partition. For a list of values, see PARTITION_STYLE.
StartingOffsetThe starting offset of the partition.
PartitionLengthThe size of the partition, in bytes.
PartitionNumberThe number of the partition (1-based).
RewritePartitionIf this member is TRUE, the partition is rewritable. The value of this parameter should be set to TRUE.
IsServicePartitionDUMMYUNIONNAMEDUMMYUNIONNAME.MbrA PARTITION_INFORMATION_MBR structure that specifies partition information specific to master boot record (MBR) disks. The MBR partition format is the standard AT-style format.
DUMMYUNIONNAME.GptA PARTITION_INFORMATION_GPT structure that specifies partition information specific to GUID partition table (GPT) disks. The GPT format corresponds to the EFI partition format.
If the partition is on a disk formatted as type master boot record (MBR), partition size totals are limited. For more information, see the Remarks section of IOCTL_DISK_SET_DRIVE_LAYOUT.
IOCTL_DISK_GET_PARTITION_INFO_EX
IOCTL_DISK_SET_PARTITION_INFO_EX