[PSDK] Re-arrange DISK/DRIVE/PARTITION layout-related structures in ntdddisk.h and winioctl.h. Add few missing structures in winioctl.h.

This commit is contained in:
Hermès Bélusca-Maïto 2020-12-06 23:42:58 +01:00
parent 39c48a4d91
commit 7ae3d530db
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 296 additions and 241 deletions

View file

@ -355,7 +355,10 @@ extern "C" {
((PartitionType) == PARTITION_XINT13))
#endif
#if(_WIN32_WINNT >= 0x0500)
#if (_WIN32_WINNT >= 0x0500)
/* Actually it should be > 0x0500, since this is not present in Windows 2000;
* however we keep >= 0x0500 for compatibility with MS PSDK. */
#define GPT_ATTRIBUTE_PLATFORM_REQUIRED 0x00000001
#define GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY 0x10000000
#define GPT_BASIC_DATA_ATTRIBUTE_SHADOW_COPY 0x20000000
@ -398,6 +401,69 @@ typedef enum _MEDIA_TYPE {
F3_32M_512
} MEDIA_TYPE, *PMEDIA_TYPE;
typedef struct _DISK_GEOMETRY {
LARGE_INTEGER Cylinders;
MEDIA_TYPE MediaType;
ULONG TracksPerCylinder;
ULONG SectorsPerTrack;
ULONG BytesPerSector;
} DISK_GEOMETRY, *PDISK_GEOMETRY;
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;
typedef struct _DRIVE_LAYOUT_INFORMATION {
ULONG PartitionCount;
ULONG Signature;
PARTITION_INFORMATION PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION, *PDRIVE_LAYOUT_INFORMATION;
typedef struct _SET_PARTITION_INFORMATION {
UCHAR PartitionType;
} SET_PARTITION_INFORMATION, *PSET_PARTITION_INFORMATION;
#if (_WIN32_WINNT >= 0x0500)
/* Actually it should be > 0x0500, since this is not present in Windows 2000;
* however we keep >= 0x0500 for compatibility with MS PSDK. */
typedef enum _PARTITION_STYLE {
PARTITION_STYLE_MBR,
PARTITION_STYLE_GPT,
PARTITION_STYLE_RAW,
#ifdef __REACTOS__
/* ReactOS custom partition handlers */
PARTITION_STYLE_BRFR = 128 /* Xbox-BRFR partitioning scheme */
#endif
} PARTITION_STYLE;
typedef struct _CREATE_DISK_GPT
{
GUID DiskId;
ULONG MaxPartitionCount;
} CREATE_DISK_GPT, *PCREATE_DISK_GPT;
typedef struct _CREATE_DISK_MBR
{
ULONG Signature;
} CREATE_DISK_MBR, *PCREATE_DISK_MBR;
typedef struct _CREATE_DISK
{
PARTITION_STYLE PartitionStyle;
union {
CREATE_DISK_MBR Mbr;
CREATE_DISK_GPT Gpt;
};
} CREATE_DISK, *PCREATE_DISK;
typedef enum _DETECTION_TYPE {
DetectNone,
DetectInt13,
@ -434,13 +500,19 @@ typedef struct _DISK_DETECTION_INFO {
} DUMMYUNIONNAME;
} DISK_DETECTION_INFO, *PDISK_DETECTION_INFO;
typedef struct _DISK_GEOMETRY {
LARGE_INTEGER Cylinders;
MEDIA_TYPE MediaType;
ULONG TracksPerCylinder;
ULONG SectorsPerTrack;
ULONG BytesPerSector;
} DISK_GEOMETRY, *PDISK_GEOMETRY;
typedef struct _DISK_PARTITION_INFO {
ULONG SizeOfPartitionInfo;
PARTITION_STYLE PartitionStyle;
_ANONYMOUS_UNION union {
struct {
ULONG Signature;
ULONG CheckSum;
} Mbr;
struct {
GUID DiskId;
} Gpt;
} DUMMYUNIONNAME;
} DISK_PARTITION_INFO, *PDISK_PARTITION_INFO;
typedef struct _DISK_GEOMETRY_EX {
DISK_GEOMETRY Geometry;
@ -464,17 +536,6 @@ typedef struct _DISK_GEOMETRY_EX {
DiskGeometryGetPartition(Geometry)->SizeOfPartitionInfo)))
#endif
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;
typedef struct _PARTITION_INFORMATION_GPT {
GUID PartitionType;
GUID PartitionId;
@ -482,45 +543,6 @@ typedef struct _PARTITION_INFORMATION_GPT {
WCHAR Name [36];
} PARTITION_INFORMATION_GPT, *PPARTITION_INFORMATION_GPT;
typedef enum _PARTITION_STYLE {
PARTITION_STYLE_MBR,
PARTITION_STYLE_GPT,
PARTITION_STYLE_RAW,
#ifdef __REACTOS__
/* ReactOS custom partition handlers */
PARTITION_STYLE_BRFR = 128 /* Xbox-BRFR partitioning scheme */
#endif
} PARTITION_STYLE;
typedef struct _DISK_PARTITION_INFO {
ULONG SizeOfPartitionInfo;
PARTITION_STYLE PartitionStyle;
_ANONYMOUS_UNION union {
struct {
ULONG Signature;
ULONG CheckSum;
} Mbr;
struct {
GUID DiskId;
} Gpt;
} DUMMYUNIONNAME;
} DISK_PARTITION_INFO, *PDISK_PARTITION_INFO;
typedef struct _DISK_PERFORMANCE {
LARGE_INTEGER BytesRead;
LARGE_INTEGER BytesWritten;
LARGE_INTEGER ReadTime;
LARGE_INTEGER WriteTime;
LARGE_INTEGER IdleTime;
ULONG ReadCount;
ULONG WriteCount;
ULONG QueueDepth;
ULONG SplitCount;
LARGE_INTEGER QueryTime;
ULONG StorageDeviceNumber;
WCHAR StorageManagerName[8];
} DISK_PERFORMANCE, *PDISK_PERFORMANCE;
typedef struct _PARTITION_INFORMATION_MBR {
UCHAR PartitionType;
BOOLEAN BootIndicator;
@ -543,19 +565,6 @@ typedef struct _PARTITION_INFORMATION_EX {
} DUMMYUNIONNAME;
} PARTITION_INFORMATION_EX, *PPARTITION_INFORMATION_EX;
typedef struct _DRIVE_LAYOUT_INFORMATION {
ULONG PartitionCount;
ULONG Signature;
PARTITION_INFORMATION PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION, *PDRIVE_LAYOUT_INFORMATION;
typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
ULONG Signature;
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
ULONG CheckSum;
#endif
} DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
GUID DiskId;
LARGE_INTEGER StartingUsableOffset;
@ -563,6 +572,13 @@ typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
ULONG MaxPartitionCount;
} DRIVE_LAYOUT_INFORMATION_GPT, *PDRIVE_LAYOUT_INFORMATION_GPT;
typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
ULONG Signature;
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
ULONG CheckSum;
#endif
} DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
ULONG PartitionStyle;
ULONG PartitionCount;
@ -573,6 +589,34 @@ typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
PARTITION_INFORMATION_EX PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION_EX, *PDRIVE_LAYOUT_INFORMATION_EX;
typedef SET_PARTITION_INFORMATION SET_PARTITION_INFORMATION_MBR;
typedef PARTITION_INFORMATION_GPT SET_PARTITION_INFORMATION_GPT;
typedef struct _SET_PARTITION_INFORMATION_EX {
PARTITION_STYLE PartitionStyle;
_ANONYMOUS_UNION union {
SET_PARTITION_INFORMATION_MBR Mbr;
SET_PARTITION_INFORMATION_GPT Gpt;
} DUMMYUNIONNAME;
} SET_PARTITION_INFORMATION_EX, *PSET_PARTITION_INFORMATION_EX;
#endif // (_WIN32_WINNT >= 0x0500)
typedef struct _DISK_PERFORMANCE {
LARGE_INTEGER BytesRead;
LARGE_INTEGER BytesWritten;
LARGE_INTEGER ReadTime;
LARGE_INTEGER WriteTime;
LARGE_INTEGER IdleTime;
ULONG ReadCount;
ULONG WriteCount;
ULONG QueueDepth;
ULONG SplitCount;
LARGE_INTEGER QueryTime;
ULONG StorageDeviceNumber;
WCHAR StorageManagerName[8];
} DISK_PERFORMANCE, *PDISK_PERFORMANCE;
typedef struct _FORMAT_EX_PARAMETERS {
MEDIA_TYPE MediaType;
ULONG StartCylinderNumber;
@ -608,21 +652,6 @@ typedef struct _REASSIGN_BLOCKS_EX {
LARGE_INTEGER BlockNumber[1];
} REASSIGN_BLOCKS_EX, *PREASSIGN_BLOCKS_EX;
typedef struct _SET_PARTITION_INFORMATION {
UCHAR PartitionType;
} SET_PARTITION_INFORMATION, *PSET_PARTITION_INFORMATION;
typedef SET_PARTITION_INFORMATION SET_PARTITION_INFORMATION_MBR;
typedef PARTITION_INFORMATION_GPT SET_PARTITION_INFORMATION_GPT;
typedef struct _SET_PARTITION_INFORMATION_EX {
PARTITION_STYLE PartitionStyle;
_ANONYMOUS_UNION union {
SET_PARTITION_INFORMATION_MBR Mbr;
SET_PARTITION_INFORMATION_GPT Gpt;
} DUMMYUNIONNAME;
} SET_PARTITION_INFORMATION_EX, *PSET_PARTITION_INFORMATION_EX;
typedef struct _VERIFY_INFORMATION {
LARGE_INTEGER StartingOffset;
ULONG Length;
@ -733,30 +762,7 @@ typedef struct _MAPPED_ADDRESS {
} MAPPED_ADDRESS, *PMAPPED_ADDRESS;
#if(_WIN32_WINNT >= 0x0500)
typedef struct _CREATE_DISK_GPT
{
GUID DiskId;
ULONG MaxPartitionCount;
} CREATE_DISK_GPT, *PCREATE_DISK_GPT;
typedef struct _CREATE_DISK_MBR
{
ULONG Signature;
} CREATE_DISK_MBR, *PCREATE_DISK_MBR;
typedef struct _CREATE_DISK
{
PARTITION_STYLE PartitionStyle;
union {
CREATE_DISK_MBR Mbr;
CREATE_DISK_GPT Gpt;
};
} CREATE_DISK, *PCREATE_DISK;
#if (_WIN32_WINNT >= 0x0500)
typedef enum {
EqualPriority,

View file

@ -237,50 +237,87 @@ typedef struct _BIN_RESULTS {
DWORD NumberOfBins;
BIN_COUNT BinCounts[1];
} BIN_RESULTS,*PBIN_RESULTS;
typedef enum _MEDIA_TYPE {
Unknown,
F5_1Pt2_512,
F3_1Pt44_512,
F3_2Pt88_512,
F3_20Pt8_512,
F3_720_512,
F5_360_512,
F5_320_512,
F5_320_1024,
F5_180_512,
F5_160_512,
RemovableMedia,
FixedMedia,
F3_120M_512,
F3_640_512,
F5_640_512,
F5_720_512,
F3_1Pt2_512,
F3_1Pt23_1024,
F5_1Pt23_1024,
F3_128Mb_512,
F3_230Mb_512,
F8_256_128,
F3_200Mb_512,
F3_240M_512,
F3_32M_512
} MEDIA_TYPE,*PMEDIA_TYPE;
typedef struct _DISK_GEOMETRY {
LARGE_INTEGER Cylinders;
MEDIA_TYPE MediaType;
DWORD TracksPerCylinder;
DWORD SectorsPerTrack;
DWORD BytesPerSector;
} DISK_GEOMETRY,*PDISK_GEOMETRY;
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;
typedef struct _DRIVE_LAYOUT_INFORMATION {
DWORD PartitionCount;
DWORD Signature;
PARTITION_INFORMATION PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION, *PDRIVE_LAYOUT_INFORMATION;
typedef struct _SET_PARTITION_INFORMATION {
BYTE PartitionType;
} SET_PARTITION_INFORMATION,*PSET_PARTITION_INFORMATION;
#if (_WIN32_WINNT >= 0x0500)
/* Actually it should be > 0x0500, since this is not present in Windows 2000;
* however we keep >= 0x0500 for compatibility with MS PSDK. */
typedef enum _PARTITION_STYLE {
PARTITION_STYLE_MBR,
PARTITION_STYLE_GPT,
PARTITION_STYLE_RAW
} PARTITION_STYLE;
typedef struct {
typedef struct _CREATE_DISK_GPT {
GUID DiskId;
DWORD MaxPartitionCount;
} CREATE_DISK_GPT,*PCREATE_DISK_GPT;
typedef struct {
typedef struct _CREATE_DISK_MBR {
DWORD Signature;
} CREATE_DISK_MBR,*PCREATE_DISK_MBR;
typedef struct {
typedef struct _CREATE_DISK {
PARTITION_STYLE PartitionStyle;
_ANONYMOUS_UNION union {
CREATE_DISK_MBR Mbr;
CREATE_DISK_GPT Gpt;
};
} CREATE_DISK,*PCREATE_DISK;
typedef enum {
EqualPriority,
KeepPrefetchedData,
KeepReadData
} DISK_CACHE_RETENTION_PRIORITY;
typedef struct _DISK_CACHE_INFORMATION {
BOOLEAN ParametersSavable;
BOOLEAN ReadCacheEnabled;
BOOLEAN WriteCacheEnabled;
DISK_CACHE_RETENTION_PRIORITY ReadRetentionPriority;
DISK_CACHE_RETENTION_PRIORITY WriteRetentionPriority;
WORD DisablePrefetchTransferLength;
BOOLEAN PrefetchScalar;
_ANONYMOUS_UNION union {
struct {
WORD Minimum;
WORD Maximum;
WORD MaximumBlocks;
} ScalarPrefetch;
struct {
WORD Minimum;
WORD Maximum;
} BlockPrefetch;
};
} DISK_CACHE_INFORMATION,*PDISK_CACHE_INFORMATION;
typedef enum _DETECTION_TYPE {
DetectNone,
DetectInt13,
@ -313,62 +350,133 @@ typedef struct _DISK_DETECTION_INFO {
};
};
} DISK_DETECTION_INFO,*PDISK_DETECTION_INFO;
typedef enum _MEDIA_TYPE {
Unknown,
F5_1Pt2_512,
F3_1Pt44_512,
F3_2Pt88_512,
F3_20Pt8_512,
F3_720_512,
F5_360_512,
F5_320_512,
F5_320_1024,
F5_180_512,
F5_160_512,
RemovableMedia,
FixedMedia,
F3_120M_512,
F3_640_512,
F5_640_512,
F5_720_512,
F3_1Pt2_512,
F3_1Pt23_1024,
F5_1Pt23_1024,
F3_128Mb_512,
F3_230Mb_512,
F8_256_128,
F3_200Mb_512,
F3_240M_512,
F3_32M_512
} MEDIA_TYPE,*PMEDIA_TYPE;
typedef struct _DISK_GEOMETRY {
LARGE_INTEGER Cylinders;
MEDIA_TYPE MediaType;
DWORD TracksPerCylinder;
DWORD SectorsPerTrack;
DWORD BytesPerSector;
} DISK_GEOMETRY,*PDISK_GEOMETRY;
typedef struct _DISK_GEOMETRY_EX {
DISK_GEOMETRY Geometry;
LARGE_INTEGER DiskSize;
BYTE Data[1];
} DISK_GEOMETRY_EX,*PDISK_GEOMETRY_EX;
typedef struct _DISK_GROW_PARTITION {
DWORD PartitionNumber;
LARGE_INTEGER BytesToGrow;
} DISK_GROW_PARTITION, *PDISK_GROW_PARTITION;
typedef struct _DISK_PARTITION_INFO {
DWORD SizeOfPartitionInfo;
PARTITION_STYLE PartitionStyle;
_ANONYMOUS_UNION union {
struct {
DWORD Signature;
DWORD CheckSum;
} Mbr;
struct {
GUID DiskId;
} Gpt;
};
} DISK_PARTITION_INFO,*PDISK_PARTITION_INFO;
typedef struct _DISK_GEOMETRY_EX {
DISK_GEOMETRY Geometry;
LARGE_INTEGER DiskSize;
BYTE Data[1];
} DISK_GEOMETRY_EX,*PDISK_GEOMETRY_EX;
#if (NTDDI_VERSION < NTDDI_WS03)
#define DiskGeometryGetPartition(Geometry) \
((PDISK_PARTITION_INFO)((Geometry) + 1))
#define DiskGeometryGetDetect(Geometry)\
((PDISK_DETECTION_INFO)(((PBYTE)DiskGeometryGetPartition(Geometry) + \
DiskGeometryGetPartition(Geometry)->SizeOfPartitionInfo)))
#else
#define DiskGeometryGetPartition(Geometry) \
((PDISK_PARTITION_INFO)((Geometry)->Data))
#define DiskGeometryGetDetect(Geometry)\
((PDISK_DETECTION_INFO)(((ULONG_PTR)DiskGeometryGetPartition(Geometry) + \
DiskGeometryGetPartition(Geometry)->SizeOfPartitionInfo)))
#endif
typedef struct _PARTITION_INFORMATION_GPT {
GUID PartitionType;
GUID PartitionId;
DWORD64 Attributes;
WCHAR Name[36];
} PARTITION_INFORMATION_GPT;
typedef struct _PARTITION_INFORMATION_MBR {
BYTE PartitionType;
BOOLEAN BootIndicator;
BOOLEAN RecognizedPartition;
DWORD HiddenSectors;
} PARTITION_INFORMATION_MBR;
typedef struct _PARTITION_INFORMATION_EX {
PARTITION_STYLE PartitionStyle;
LARGE_INTEGER StartingOffset;
LARGE_INTEGER PartitionLength;
DWORD PartitionNumber;
BOOLEAN RewritePartition;
#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
BOOLEAN IsServicePartition;
#endif
_ANONYMOUS_UNION union {
PARTITION_INFORMATION_MBR Mbr;
PARTITION_INFORMATION_GPT Gpt;
};
} PARTITION_INFORMATION_EX;
typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
GUID DiskId;
LARGE_INTEGER StartingUsableOffset;
LARGE_INTEGER UsableLength;
DWORD MaxPartitionCount;
} DRIVE_LAYOUT_INFORMATION_GPT,*PDRIVE_LAYOUT_INFORMATION_GPT;
typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
DWORD Signature;
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
DWORD CheckSum;
#endif
} DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
DWORD PartitionStyle;
DWORD PartitionCount;
_ANONYMOUS_UNION union {
DRIVE_LAYOUT_INFORMATION_MBR Mbr;
DRIVE_LAYOUT_INFORMATION_GPT Gpt;
};
PARTITION_INFORMATION_EX PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION_EX,*PDRIVE_LAYOUT_INFORMATION_EX;
typedef SET_PARTITION_INFORMATION SET_PARTITION_INFORMATION_MBR;
typedef PARTITION_INFORMATION_GPT SET_PARTITION_INFORMATION_GPT;
typedef struct _SET_PARTITION_INFORMATION_EX {
PARTITION_STYLE PartitionStyle;
_ANONYMOUS_UNION union {
SET_PARTITION_INFORMATION_MBR Mbr;
SET_PARTITION_INFORMATION_GPT Gpt;
} DUMMYUNIONNAME;
} SET_PARTITION_INFORMATION_EX, *PSET_PARTITION_INFORMATION_EX;
#endif // (_WIN32_WINNT >= 0x0500)
typedef struct _DISK_GROW_PARTITION {
DWORD PartitionNumber;
LARGE_INTEGER BytesToGrow;
} DISK_GROW_PARTITION, *PDISK_GROW_PARTITION;
typedef enum {
EqualPriority,
KeepPrefetchedData,
KeepReadData
} DISK_CACHE_RETENTION_PRIORITY;
typedef struct _DISK_CACHE_INFORMATION {
BOOLEAN ParametersSavable;
BOOLEAN ReadCacheEnabled;
BOOLEAN WriteCacheEnabled;
DISK_CACHE_RETENTION_PRIORITY ReadRetentionPriority;
DISK_CACHE_RETENTION_PRIORITY WriteRetentionPriority;
WORD DisablePrefetchTransferLength;
BOOLEAN PrefetchScalar;
_ANONYMOUS_UNION union {
struct {
WORD Minimum;
WORD Maximum;
WORD MaximumBlocks;
} ScalarPrefetch;
struct {
WORD Minimum;
WORD Maximum;
} BlockPrefetch;
};
} DISK_CACHE_INFORMATION,*PDISK_CACHE_INFORMATION;
typedef struct _DISK_PERFORMANCE {
LARGE_INTEGER BytesRead;
LARGE_INTEGER BytesWritten;
@ -448,62 +556,6 @@ typedef struct _VOLUME_DISK_EXTENTS {
DWORD NumberOfDiskExtents;
DISK_EXTENT Extents[1];
} VOLUME_DISK_EXTENTS,*PVOLUME_DISK_EXTENTS;
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;
typedef struct _DRIVE_LAYOUT_INFORMATION {
DWORD PartitionCount;
DWORD Signature;
PARTITION_INFORMATION PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION, *PDRIVE_LAYOUT_INFORMATION;
typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
GUID DiskId;
LARGE_INTEGER StartingUsableOffset;
LARGE_INTEGER UsableLength;
ULONG MaxPartitionCount;
} DRIVE_LAYOUT_INFORMATION_GPT,*PDRIVE_LAYOUT_INFORMATION_GPT;
typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
ULONG Signature;
} DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
typedef struct _PARTITION_INFORMATION_MBR {
BYTE PartitionType;
BOOLEAN BootIndicator;
BOOLEAN RecognizedPartition;
DWORD HiddenSectors;
} PARTITION_INFORMATION_MBR;
typedef struct _PARTITION_INFORMATION_GPT {
GUID PartitionType;
GUID PartitionId;
DWORD64 Attributes;
WCHAR Name[36];
} PARTITION_INFORMATION_GPT;
typedef struct _PARTITION_INFORMATION_EX {
PARTITION_STYLE PartitionStyle;
LARGE_INTEGER StartingOffset;
LARGE_INTEGER PartitionLength;
DWORD PartitionNumber;
BOOLEAN RewritePartition;
_ANONYMOUS_UNION union {
PARTITION_INFORMATION_MBR Mbr;
PARTITION_INFORMATION_GPT Gpt;
};
} PARTITION_INFORMATION_EX;
typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
DWORD PartitionStyle;
DWORD PartitionCount;
_ANONYMOUS_UNION union {
DRIVE_LAYOUT_INFORMATION_MBR Mbr;
DRIVE_LAYOUT_INFORMATION_GPT Gpt;
};
PARTITION_INFORMATION_EX PartitionEntry[1];
} DRIVE_LAYOUT_INFORMATION_EX,*PDRIVE_LAYOUT_INFORMATION_EX;
typedef struct {
HANDLE FileHandle;
LARGE_INTEGER StartingVcn;
@ -535,9 +587,6 @@ typedef struct _REASSIGN_BLOCKS {
WORD Count;
DWORD BlockNumber[1];
} REASSIGN_BLOCKS,*PREASSIGN_BLOCKS;
typedef struct _SET_PARTITION_INFORMATION {
BYTE PartitionType;
} SET_PARTITION_INFORMATION,*PSET_PARTITION_INFORMATION;
typedef struct {
LARGE_INTEGER StartingLcn;
} STARTING_LCN_INPUT_BUFFER,*PSTARTING_LCN_INPUT_BUFFER;