PARTITION_INFORMATION_EX structure

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.

Syntax


typedef struct _PARTITION_INFORMATION_EX {
  PARTITION_STYLE PartitionStyle;
  LARGE_INTEGER   StartingOffset;
  LARGE_INTEGER   PartitionLength;
  ULONG           PartitionNumber;
  BOOLEAN         RewritePartition;
  union {
    PARTITION_INFORMATION_MBR Mbr;
    PARTITION_INFORMATION_GPT Gpt;
  };
} PARTITION_INFORMATION_EX, *PPARTITION_INFORMATION_EX;

Members

PartitionStyle

Takes a PARTITION_STYLE enumerated value that specifies the type of partition table that contains the partition.

StartingOffset

Specifies the offset in bytes on drive where the partition begins.

PartitionLength

Specifies the length in bytes of the partition.

PartitionNumber

Specifies the number of the partition.

RewritePartition

Indicates, 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.

Mbr

Contains a structure of type PARTITION_INFORMATION_MBR containing information specific to a partition with a PartitionStyle member of PARTITION_STYLE_MBR.

Gpt

Contains a structure of type PARTITION_INFORMATION_GPT containing information specific to a partition with a PartitionStyle member of PARTITION_STYLE_GPT.

Remarks

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 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.

Requirements

Header

Ntdddisk.h (include Ntdddisk.h)

See also

PARTITION_INFORMATION_MBR
PARTITION_INFORMATION_GPT
IoReadPartitionTable
IoWritePartitionTable

 

 

Send comments about this topic to Microsoft

Show: