mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[SDK][PSDK] Add a version check for DiskGeometryGetPartition and DiskGeometryGetDetect and add a missing member to PARTITION_INFORMATION_EX structure (#2541)
DiskGeometryGetPartition() and DiskGeometryGetDetect() are guarded in NTDDI_VERSION for version checking as they differ between Windows XP and Server 2003. In conjunction to that, the PARTITION_INFORMATION_EX structure has "IsServicePartition" as member which is missing in the current NT IOCTL Disk interface header.
This commit is contained in:
parent
643458114f
commit
12d4409086
1 changed files with 12 additions and 0 deletions
|
@ -387,12 +387,21 @@ typedef struct _DISK_GEOMETRY_EX {
|
|||
UCHAR 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 {
|
||||
LARGE_INTEGER StartingOffset;
|
||||
|
@ -464,6 +473,9 @@ typedef struct _PARTITION_INFORMATION_EX {
|
|||
LARGE_INTEGER PartitionLength;
|
||||
ULONG PartitionNumber;
|
||||
BOOLEAN RewritePartition;
|
||||
#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
|
||||
BOOLEAN IsServicePartition;
|
||||
#endif
|
||||
_ANONYMOUS_UNION union {
|
||||
PARTITION_INFORMATION_MBR Mbr;
|
||||
PARTITION_INFORMATION_GPT Gpt;
|
||||
|
|
Loading…
Reference in a new issue