16#define PARTITION_EISA 0x12
17#define PARTITION_HIBERNATION 0x84
18#define PARTITION_DIAGNOSTIC 0xA0
19#define PARTITION_DELL 0xDE
20#define PARTITION_IBM 0xFE
22#define IsOEMPartition(PartitionType) \
23 ( ((PartitionType) == PARTITION_EISA) || \
24 ((PartitionType) == PARTITION_HIBERNATION) || \
25 ((PartitionType) == PARTITION_DIAGNOSTIC) || \
26 ((PartitionType) == PARTITION_DELL) || \
27 ((PartitionType) == PARTITION_IBM) )
191#define PARTITION_TBL_SIZE 4
193#define PARTITION_MAGIC 0xAA55
196#define EFI_PMBR_OSTYPE_EFI 0xEE
251#define GetPartEntryOffsetInBytes(PartEntry) \
252 ((PartEntry)->StartSector.QuadPart * (PartEntry)->DiskEntry->BytesPerSector)
254#define GetPartEntrySizeInBytes(PartEntry) \
255 ((PartEntry)->SectorCount.QuadPart * (PartEntry)->DiskEntry->BytesPerSector)
257#define GetDiskSizeInBytes(DiskEntry) \
258 ((DiskEntry)->SectorCount.QuadPart * (DiskEntry)->BytesPerSector)
263 _In_ const DISK_PARTITION_INFO* DiskInfo,
274 _In_ const DRIVE_LAYOUT_INFORMATION_EX* LayoutEx,
enum _FORMATSTATE FORMATSTATE
static const WCHAR Signature[]
enum _ERROR_NUMBER ERROR_NUMBER
BOOLEAN SetMountedDeviceValues(_In_ PPARTLIST List)
struct _PARTITION * PPARTITION
BOOLEAN IsDiskSuperFloppy2(_In_ const DISK_PARTITION_INFO *DiskInfo, _In_opt_ const ULONGLONG *DiskSize, _In_ const PARTITION_INFORMATION *PartitionInfo)
ERROR_NUMBER NTAPI PartitionCreateChecks(_In_ PPARTENTRY PartEntry, _In_opt_ ULONGLONG SizeBytes, _In_opt_ ULONG_PTR PartitionInfo)
struct _VOLENTRY VOLENTRY
ULONGLONG AlignUp(IN ULONGLONG Value, IN ULONG Alignment)
enum _FORMATSTATE FORMATSTATE
BOOLEAN WritePartitionsToDisk(IN PPARTLIST List)
ULONGLONG RoundingDivide(IN ULONGLONG Dividend, IN ULONGLONG Divisor)
VOID SetMBRPartitionType(IN PPARTENTRY PartEntry, IN UCHAR PartitionType)
VOID NTAPI DestroyPartitionList(IN PPARTLIST List)
enum _FORMATSTATE * PFORMATSTATE
struct BIOS_DISK * PBIOS_DISK
BOOLEAN IsSuperFloppy(_In_ PDISKENTRY DiskEntry)
struct _PARTLIST * PPARTLIST
struct _PARTITION_SECTOR * PPARTITION_SECTOR
ULONGLONG AlignDown(IN ULONGLONG Value, IN ULONG Alignment)
PPARTENTRY NTAPI GetAdjUnpartitionedEntry(_In_ PPARTENTRY PartEntry, _In_ BOOLEAN Direction)
Retrieves, if any, the unpartitioned disk region that is adjacent (next or previous) to the specified...
struct _VOLENTRY * PVOLENTRY
PDISKENTRY GetDiskByBiosNumber(_In_ PPARTLIST List, _In_ ULONG HwDiskNumber)
struct _PARTENTRY * PPARTENTRY
struct _BIOSDISKENTRY * PBIOSDISKENTRY
BOOLEAN NTAPI CreatePartition(_In_ PPARTLIST List, _Inout_ PPARTENTRY PartEntry, _In_opt_ ULONGLONG SizeBytes, _In_opt_ ULONG_PTR PartitionInfo)
PDISKENTRY GetDiskBySCSI(_In_ PPARTLIST List, _In_ USHORT Port, _In_ USHORT Bus, _In_ USHORT Id)
BOOLEAN NTAPI DeletePartition(_In_ PPARTLIST List, _In_ PPARTENTRY PartEntry, _Out_opt_ PPARTENTRY *FreeRegion)
PDISKENTRY GetDiskBySignature(_In_ PPARTLIST List, _In_ ULONG Signature)
PPARTENTRY GetPartition(_In_ PDISKENTRY DiskEntry, _In_ ULONG PartitionNumber)
BOOLEAN IsPartitionActive(IN PPARTENTRY PartEntry)
PPARTLIST NTAPI CreatePartitionList(VOID)
struct _PARTITION_SECTOR PARTITION_SECTOR
BOOLEAN SetActivePartition(IN PPARTLIST List, IN PPARTENTRY PartEntry, IN PPARTENTRY OldActivePart OPTIONAL)
struct _DISKENTRY DISKENTRY
PPARTENTRY NTAPI GetPrevPartition(IN PPARTLIST List, IN PPARTENTRY CurrentPart OPTIONAL)
struct _PARTLIST PARTLIST
BOOLEAN IsDiskSuperFloppyEx(_In_ const DRIVE_LAYOUT_INFORMATION_EX *LayoutEx, _In_opt_ const ULONGLONG *DiskSize)
PPARTENTRY SelectPartition(_In_ PPARTLIST List, _In_ ULONG DiskNumber, _In_ ULONG PartitionNumber)
PPARTENTRY NTAPI GetNextPartition(IN PPARTLIST List, IN PPARTENTRY CurrentPart OPTIONAL)
PDISKENTRY GetDiskByNumber(_In_ PPARTLIST List, _In_ ULONG DiskNumber)
PPARTENTRY FindSupportedSystemPartition(IN PPARTLIST List, IN BOOLEAN ForceSelect, IN PDISKENTRY AlternativeDisk OPTIONAL, IN PPARTENTRY AlternativePart OPTIONAL)
struct _BIOSDISKENTRY BIOSDISKENTRY
struct _DISKENTRY * PDISKENTRY
struct _PARTENTRY PARTENTRY
struct _PARTITION PARTITION
NTSTATUS WritePartitions(IN PDISKENTRY DiskEntry)
BOOLEAN IsDiskSuperFloppy(_In_ const DRIVE_LAYOUT_INFORMATION *Layout, _In_opt_ const ULONGLONG *DiskSize)
enum _PARTITION_STYLE PARTITION_STYLE
enum _MEDIA_TYPE MEDIA_TYPE
PULONG MinorVersion OPTIONAL
CM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry
CM_INT13_DRIVE_PARAMETER Int13DiskData
ULARGE_INTEGER SectorCount
UNICODE_STRING DriverName
PPARTENTRY ExtendedPartition
LIST_ENTRY LogicalPartListHead
struct _PARTLIST * PartList
PARTITION_STYLE DiskStyle
LIST_ENTRY PrimaryPartListHead
PDRIVE_LAYOUT_INFORMATION LayoutBuffer
ULARGE_INTEGER SectorCount
struct _DISKENTRY * DiskEntry
ULONG OnDiskPartitionNumber
ULARGE_INTEGER StartSector
PARTITION Partition[PARTITION_TBL_SIZE]
unsigned char PartitionType
unsigned char EndingSector
unsigned char StartingHead
unsigned int StartingBlock
unsigned char EndingCylinder
unsigned char StartingSector
unsigned char StartingCylinder
PPARTENTRY SystemPartition
LIST_ENTRY BiosDiskListHead
LIST_ENTRY ListEntry
Entry in VolumesList.
#define PARTITION_TBL_SIZE
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
WDF_EXTERN_C_START typedef _In_ WDFDEVICE _In_ WDFCONTEXT _In_ WDF_DMA_DIRECTION Direction
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_Must_inspect_result_ _In_ WDFCMRESLIST List
_Reserved_ PVOID Reserved
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EX * PartitionInfo
_In_ ULONG _In_ ULONG PartitionNumber
_In_ LARGE_INTEGER Divisor