DRIVE_LAYOUT_INFORMATION_EX - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// 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

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-ntdddisk-_drive_layout_information_ex)

_DRIVE_LAYOUT_INFORMATION_EX structure

Description

The DRIVE_LAYOUT_INFORMATION_EX structure is used to report information about the driver layout.

Members

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.

Remarks

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.

See also

DRIVE_LAYOUT_INFORMATION_GPT

DRIVE_LAYOUT_INFORMATION_MBR

IoReadPartitionTableEx

IoWritePartitionTableEx

PARTITION_STYLE


Win32 API reference (ns-winioctl-drive_layout_information_ex)

DRIVE_LAYOUT_INFORMATION_EX structure

Description

Contains extended information about a drive's partitions.

Members

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.

See also

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