NTSTATUS
IoReadPartitionTableEx(
  IN  PDEVICE_OBJECT DeviceObject,
  IN  PDRIVE_LAYOUT_INFORMATION_EX* DriveLayout
  );

Routine Description:

    This routine reads the partition table for the disk. Unlike
    IoReadPartitionTable, this routine understands both EFI and MBR
    partitioned disks.

    The partition list is built in nonpaged pool that is allocated by this
    routine. It is the caller's responsability to free this memory when it
    is finished with the data.

Arguments:

    DeviceObject - Pointer for device object for this disk.

    DriveLayout - Pointer to the pointer that will return the patition list.
            This buffer is allocated in nonpaged pool by this routine. It is
            the responsability of the caller to free this memory if this
            routine is successful.

Return Values:

    NTSTATUS code.