public DRIVE_LAYOUT_INFORMATION_EX DiskGetDriveLayoutEx()
{
DRIVE_LAYOUT_INFORMATION_EX_INTERNAL data = DeviceIoControlHelper.InvokeIoControl<DRIVE_LAYOUT_INFORMATION_EX_INTERNAL>(Handle, IOControlCode.DiskGetDriveLayoutEx);
DRIVE_LAYOUT_INFORMATION_EX res = new DRIVE_LAYOUT_INFORMATION_EX();
res.PartitionStyle = data.PartitionStyle;
res.PartitionCount = data.PartitionCount;
res.DriveLayoutInformaiton = data.DriveLayoutInformaiton;
res.PartitionEntry = new PARTITION_INFORMATION_EX[res.PartitionCount];
for (int i = 0; i < res.PartitionCount; i++)
res.PartitionEntry[i] = data.PartitionEntry[i];
return res;
}