Bewerken

Delen via


PARTITION_INFORMATION_EX structure (ntdddisk.h)

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;
  BOOLEAN         IsServicePartition;
  union {
    PARTITION_INFORMATION_MBR Mbr;
    PARTITION_INFORMATION_GPT Gpt;
  } DUMMYUNIONNAME;
} 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.

IsServicePartition

When TRUE, indicates that the partition is service.

DUMMYUNIONNAME

DUMMYUNIONNAME.Mbr

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

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

Requirements

Requirement Value
Header ntdddisk.h (include Ntdddisk.h)

See also

IoReadPartitionTable

IoWritePartitionTable

PARTITION_INFORMATION_GPT

PARTITION_INFORMATION_MBR