2016-05-19 03:50:22 -04:00
|
|
|
#pragma once
|
|
|
|
|
2016-05-19 15:03:57 -04:00
|
|
|
#define IOCTL_DISK_GET_DRIVE_GEOMETRY 0x70000
|
2016-05-19 03:50:22 -04:00
|
|
|
#define IOCTL_DISK_GET_PARTITION_INFO 0x74004
|
|
|
|
|
2016-05-19 15:03:57 -04:00
|
|
|
typedef struct __attribute__((packed)) DISK_GEOMETRY {
|
|
|
|
uint64_t Cylinders; // 0x00
|
|
|
|
uint32_t MediaType, TracksPerCylinder, SectorsPerTrack, BytesPerSector; // 0x08 0x0C 0x10 0x14
|
|
|
|
} DISK_GEOMETRY;
|
|
|
|
|
2016-05-19 03:50:22 -04:00
|
|
|
typedef struct __attribute__((packed)) PARTITION_INFORMATION {
|
2016-05-19 15:03:57 -04:00
|
|
|
uint64_t StartingOffset, PartitionLength; // 0x00 0x08
|
|
|
|
uint32_t HiddenSectors, PartitionNumber; // 0x10 0x14
|
|
|
|
uint8_t PartitionType, BootIndicator, RecognizedPartition, RewritePartition; // 0x18 0x19 0x20 0x21
|
2016-05-19 03:50:22 -04:00
|
|
|
} PARTITION_INFORMATION;
|