public DRIVE_LAYOUT_INFORMATION DiskGetDriveLayout()
{
DRIVE_LAYOUT_INFORMATION_INTERNAL data = DeviceIoControlHelper.InvokeIoControl<DRIVE_LAYOUT_INFORMATION_INTERNAL>(Handle, IOControlCode.DiskGetDriveLayout);
DRIVE_LAYOUT_INFORMATION res = new DRIVE_LAYOUT_INFORMATION();
res.PartitionCount = data.PartitionCount;
res.Signature = data.Signature;
res.PartitionEntry = new PARTITION_INFORMATION[res.PartitionCount];
for (int i = 0; i < res.PartitionCount; i++)
res.PartitionEntry[i] = data.PartitionEntry[i];
return res;
}