// ntdddisk.h
typedef struct _DISK_PARTITION_INFO {
ULONG SizeOfPartitionInfo;
PARTITION_STYLE PartitionStyle;
union {
struct {
ULONG Signature;
ULONG CheckSum;
} Mbr;
struct {
GUID DiskId;
} Gpt;
} DUMMYUNIONNAME;
} DISK_PARTITION_INFO, *PDISK_PARTITION_INFO;
View the official Windows Driver Kit DDI reference// winioctl.h
typedef struct _DISK_PARTITION_INFO {
DWORD SizeOfPartitionInfo;
PARTITION_STYLE PartitionStyle;
union {
struct {
DWORD Signature;
DWORD CheckSum;
} Mbr;
struct {
GUID DiskId;
} Gpt;
} DUMMYUNIONNAME;
} DISK_PARTITION_INFO, *PDISK_PARTITION_INFO;
View the official Win32 API referenceNo description available.
The DISK_PARTITION_INFO structure is used to report information about the disk's partition table.
SizeOfPartitionInfoSize of this structure in bytes. Set to sizeof(DISK_PARTITION_INFO).
PartitionStyleTakes a PARTITION_STYLE enumerated value that specifies the type of partition table the disk contains.
DUMMYUNIONNAMEDUMMYUNIONNAME.MbrIf PartitionStyle == MBR
DUMMYUNIONNAME.Mbr.SignatureSpecifies the signature value, which uniquely identifies the disk. The Mbr member of the union is used to specify the disk signature data for a disk formatted with a Master Boot Record (MBR) format partition table. Any other value indicates that the partition is not a boot partition. This member is valid when PartitionStyle is PARTITION_STYLE_MBR.
DUMMYUNIONNAME.Mbr.CheckSumSpecifies the checksum for the master boot record. The Mbr member of the union is used to specify the disk signature data for a disk formatted with a Master Boot Record (MBR) format partition table. This member is valid when PartitionStyle is PARTITION_STYLE_MBR.
DUMMYUNIONNAME.GptIf PartitionStyle == GPT
DUMMYUNIONNAME.Gpt.DiskIdSpecifies the GUID that uniquely identifies the disk. The Gpt member of the union is used to specify the disk signature data for a disk that is formatted with a GUID Partition Table (GPT) format partition table. This member is valid when PartitionStyle is PARTITION_STYLE_GPT. The GUID data type is described on the Using GUIDs in Drivers reference page.
Contains the disk partition information.
SizeOfPartitionInfoThe size of this structure, in bytes.
PartitionStyleThe format of a partition.
For more information, see PARTITION_STYLE.
DUMMYUNIONNAMEDUMMYUNIONNAME.MbrIf PartitionStyle is PARTITION_STYLE_MBR (0), the union is a structure that contains information for a master boot record partition, which includes a disk signature and a checksum.
DUMMYUNIONNAME.Mbr.SignatureMBR signature of the partition.
DUMMYUNIONNAME.Mbr.CheckSumDUMMYUNIONNAME.GptIf PartitionStyle is PARTITION_STYLE_GPT (1), the union is a structure that contains information for a GUID partition table partition, which includes a disk identifier (GUID).
DUMMYUNIONNAME.Gpt.DiskIdGUID of the GPT partition.
DISK_GEOMETRY_EX, PARTITION_STYLE