PARTITION_INFORMATION - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntdddisk.h

typedef struct _PARTITION_INFORMATION {
  LARGE_INTEGER StartingOffset;
  LARGE_INTEGER PartitionLength;
  ULONG         HiddenSectors;
  ULONG         PartitionNumber;
  UCHAR         PartitionType;
  BOOLEAN       BootIndicator;
  BOOLEAN       RecognizedPartition;
  BOOLEAN       RewritePartition;
} PARTITION_INFORMATION, *PPARTITION_INFORMATION;

View the official Windows Driver Kit DDI reference
// winioctl.h

typedef struct _PARTITION_INFORMATION {
  LARGE_INTEGER StartingOffset;
  LARGE_INTEGER PartitionLength;
  DWORD         HiddenSectors;
  DWORD         PartitionNumber;
  BYTE          PartitionType;
  BOOLEAN       BootIndicator;
  BOOLEAN       RecognizedPartition;
  BOOLEAN       RewritePartition;
} PARTITION_INFORMATION, *PPARTITION_INFORMATION;

View the official Win32 API reference

NtDoc

No description available.

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

_PARTITION_INFORMATION structure

Description

The PARTITION_INFORMATION structure contains partition information for a partition with a traditional AT-style Master Boot Record (MBR).

Members

StartingOffset

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

PartitionLength

Specifies the length in bytes of the partition.

HiddenSectors

Specifies the number of hidden sectors.

PartitionNumber

Specifies the number of the partition.

PartitionType

Possible values are as follows:

Partition Type Meaning
PARTITION_ENTRY_UNUSED Unused entry
PARTITION_FAT_12 Specifies a partition with 12-bit FAT entries
PARTITION_XENIX_1 Specifies a XENIX Type 1 partition
PARTITION_XENIX_2 Specifies a XENIX Type 2 partition
PARTITION_FAT_16 Specifies a partition with 16-bit FAT entries.
PARTITION_EXTENDED Specifies an MS-DOS V4 extended partition
PARTITION_HUGE Specifies an MS-DOS V4 huge partition
PARTITION_IFS Specifies an IFS partition
PARTITION_FAT32 Specifies a FAT32 partition
PARTITION_FAT32_XINT13 Windows 95/98: Specifies a partition that uses extended INT 13 services
PARTITION_XINT13_EXTENDED Windows 95/98: Same as PARTITION_EXTENDED, but uses extended INT 13 services
PARTITION_PREP Specifies a PowerPC Reference Platform partition
PARTITION_LDM Specifies a logical disk manager partition
PARTITION_UNIX Specifies a UNIX partition
PARTITION_NTFT Specifies an NTFT partition. This value is used in combination (that is, bitwise logically ORed) with the other values in this table

BootIndicator

Indicates, when TRUE, that this partition is a bootable (active) partition for this device. When FALSE, this partition is not bootable. This member is set according to the partition list entry boot indicator returned by IoReadPartitionTable.

RecognizedPartition

Indicates, when TRUE, that the system recognized the type of the partition. When FALSE, the system did not recognize the type of the partition.

RewritePartition

Indicates, when TRUE, that the partition information has changed. When FALSE, the partition 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.

Remarks

The partition entry data in PARTITION_INFORMATION forms part of the drive layout information reported by the legacy routine IoReadPartitionTable in the DRIVE_LAYOUT_INFORMATION structure. DRIVE_LAYOUT_INFORMATION contains an array of PARTITION_INFORMATION structures pointed to by its PartitionEntry member. Each partition entry contains information for a partition on the drive. PARTITION_INFORMATION is also used with the legacy routine IoSetPartitionInformation to change the properties of the partition, such as its type, recorded on the disk.

Disk drivers should now use structures DRIVE_LAYOUT_INFORMATION_EX and PARTITION_INFORMATION_EX along with routines IoReadPartitionTableEx and IoSetPartitionInformationEx to read and alter partition information on the disk.

See also

DRIVE_LAYOUT_INFORMATION

DRIVE_LAYOUT_INFORMATION_EX

IoReadPartitionTable

IoReadPartitionTableEx

IoSetPartitionInformation

IoSetPartitionInformationEx

PARTITION_INFORMATION_EX


Win32 API reference (ns-winioctl-partition_information)

PARTITION_INFORMATION structure

Description

Contains information about a disk partition.

Note PARTITION_INFORMATION has been superseded by the PARTITION_INFORMATION_EX structure.

Members

StartingOffset

The starting offset of the partition.

PartitionLength

The length of the partition, in bytes.

HiddenSectors

The number of hidden sectors in the partition.

PartitionNumber

The number of the partition (1-based).

PartitionType

The type of partition. For a list of values, see Disk Partition Types.

BootIndicator

If this member is TRUE, the partition is bootable.

RecognizedPartition

If this member is TRUE, the partition is of a recognized type.

RewritePartition

If this member is TRUE, the partition information has changed. When you change a partition (with IOCTL_DISK_SET_DRIVE_LAYOUT), the system uses this member to determine which partitions have changed and need their information rewritten.

Remarks

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.

See also

File System Recognition

IOCTL_DISK_GET_DRIVE_LAYOUT

IOCTL_DISK_GET_PARTITION_INFO

IOCTL_DISK_SET_DRIVE_LAYOUT

IOCTL_DISK_SET_PARTITION_INFO

PARTITION_INFORMATION_EX

PARTITION_STYLE