Hi
I partitioned my hard disk into 3 primary partitions, 1 extended partition with 2 logical partitions. The list of all partitions from diskpart (or from disk management MMC) is the following:
Partition 1 - Primar
Partition 2 - Primar
Partition 3 - Extende
Partition 4 - Logica
Partition 5 - Logica
Partition 6 - Primar
I write a C++ tool to get the position of the last primary partition (in the example above is #6) using IOCTL_DISK_GET_DRIVE_LAYOUT_EX. However, when I iterate the partitions (PARTITION_INFORMATION_EX) in DRIVE_LAYOUT_INFORMATION_EX, it returns all the primary partitions first then the rests, i.e. partition 6 above becomes partition 3
Does anyone know why? Does primary partition takes higher precedence than extended/logical partition? IOCTL_DISK_GET_DRIVE_LAYOUT_EX should return an exact layout of the partition in the drive as it's shown in either diskpart or disk management MMC, should it not
Please help, thanks
-Paul