19 #define NUM_PARTITION_TYPE_ENTRIES 143 28 #define PARTITION_EISA 0x12 // EISA partition 29 #define PARTITION_HIBERNATION 0x84 // Hibernation partition for laptops 30 #define PARTITION_DIAGNOSTIC 0xA0 // Diagnostic partition on some Hewlett-Packard (HP) notebooks 31 #define PARTITION_DELL 0xDE // Dell partition 32 #define PARTITION_IBM 0xFE // IBM Initial Microprogram Load (IML) partition 34 #define IsOEMPartition(PartitionType) \ 35 ( ((PartitionType) == PARTITION_EISA) || \ 36 ((PartitionType) == PARTITION_HIBERNATION) || \ 37 ((PartitionType) == PARTITION_DIAGNOSTIC) || \ 38 ((PartitionType) == PARTITION_DELL) || \ 39 ((PartitionType) == PARTITION_IBM) ) 182 #define PARTITION_TBL_SIZE 4 184 #define PARTITION_MAGIC 0xAA55 187 #define EFI_PMBR_OSTYPE_EFI 0xEE 189 #include <pshpack1.h> ERROR_NUMBER PrimaryPartitionCreationChecks(IN PPARTENTRY PartEntry)
LIST_ENTRY PrimaryPartListHead
struct _DISKENTRY DISKENTRY
struct _PARTLIST * PartList
struct _PARTLIST PARTLIST
ULARGE_INTEGER StartSector
LIST_ENTRY BiosDiskListHead
struct _PARTLIST * PPARTLIST
struct _PARTENTRY PARTENTRY
_In_ PFCB _In_ LONGLONG StartingOffset
BOOLEAN IsPartitionActive(IN PPARTENTRY PartEntry)
ULONGLONG AlignDown(IN ULONGLONG Value, IN ULONG Alignment)
PDISKENTRY GetDiskByBiosNumber(IN PPARTLIST List, IN ULONG HwDiskNumber)
unsigned char EndingSector
PPARTENTRY GetPrevPartition(IN PPARTLIST List, IN PPARTENTRY CurrentPart OPTIONAL)
NTSTATUS WritePartitions(IN PDISKENTRY DiskEntry)
ULARGE_INTEGER SectorCount
BOOLEAN GetDiskOrPartition(IN PPARTLIST List, IN ULONG DiskNumber, IN ULONG PartitionNumber OPTIONAL, OUT PDISKENTRY *pDiskEntry, OUT PPARTENTRY *pPartEntry OPTIONAL)
struct _PARTITION_TYPE PARTITION_TYPE
enum _MEDIA_TYPE MEDIA_TYPE
_In_ ULONG _In_ ULONG PartitionNumber
struct _BIOSDISKENTRY * PBIOSDISKENTRY
VOID DestroyPartitionList(IN PPARTLIST List)
PDISKENTRY GetDiskBySCSI(IN PPARTLIST List, IN USHORT Port, IN USHORT Bus, IN USHORT Id)
BOOLEAN DeletePartition(IN PPARTLIST List, IN PPARTENTRY PartEntry, OUT PPARTENTRY *FreeRegion OPTIONAL)
BOOLEAN SetMountedDeviceValue(IN WCHAR Letter, IN ULONG Signature, IN LARGE_INTEGER StartingOffset)
unsigned char EndingCylinder
PPARTENTRY SystemPartition
ULONGLONG AlignUp(IN ULONGLONG Value, IN ULONG Alignment)
PPARTENTRY ExtendedPartition
struct _PARTITION_TYPE * PPARTITION_TYPE
PARTITION_STYLE DiskStyle
BOOLEAN SetMountedDeviceValues(IN PPARTLIST List)
struct _BIOSDISKENTRY BIOSDISKENTRY
#define PARTITION_TBL_SIZE
struct _PARTITION * PPARTITION
unsigned int StartingBlock
BOOLEAN GetNextUncheckedPartition(IN PPARTLIST List, OUT PDISKENTRY *pDiskEntry OPTIONAL, OUT PPARTENTRY *pPartEntry)
_Reserved_ PVOID Reserved
VOID SetMBRPartitionType(IN PPARTENTRY PartEntry, IN UCHAR PartitionType)
BOOLEAN CreateLogicalPartition(IN PPARTLIST List, IN OUT PPARTENTRY PartEntry, IN ULONGLONG SectorCount, IN BOOLEAN AutoCreate)
PPARTENTRY SelectPartition(IN PPARTLIST List, IN ULONG DiskNumber, IN ULONG PartitionNumber)
ULARGE_INTEGER SectorCount
PPARTENTRY GetNextPartition(IN PPARTLIST List, IN PPARTENTRY CurrentPart OPTIONAL)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
struct _DISKENTRY * DiskEntry
UNICODE_STRING DriverName
ULONG OnDiskPartitionNumber
unsigned char StartingCylinder
CM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry
WCHAR FileSystem[MAX_PATH+1]
unsigned char PartitionType
NTSTATUS DismountVolume(IN PPARTENTRY PartEntry)
struct BIOS_DISK * PBIOS_DISK
enum _ERROR_NUMBER ERROR_NUMBER
PARTITION_TYPE PartitionTypes[NUM_PARTITION_TYPE_ENTRIES]
ERROR_NUMBER ExtendedPartitionCreationChecks(IN PPARTENTRY PartEntry)
_Must_inspect_result_ _In_ WDFCMRESLIST List
enum _PARTITION_STYLE PARTITION_STYLE
BOOLEAN SetActivePartition(IN PPARTLIST List, IN PPARTENTRY PartEntry, IN PPARTENTRY OldActivePart OPTIONAL)
enum _FORMATSTATE FORMATSTATE
struct _PARTENTRY * PPARTENTRY
PDISKENTRY GetDiskBySignature(IN PPARTLIST List, IN ULONG Signature)
unsigned char StartingHead
BOOLEAN IsSuperFloppy(IN PDISKENTRY DiskEntry)
PARTITION Partition[PARTITION_TBL_SIZE]
struct _PARTITION PARTITION
ULONGLONG RoundingDivide(IN ULONGLONG Dividend, IN ULONGLONG Divisor)
struct _PARTITION_SECTOR * PPARTITION_SECTOR
LIST_ENTRY LogicalPartListHead
PDISKENTRY GetDiskByNumber(IN PPARTLIST List, IN ULONG DiskNumber)
_In_ LARGE_INTEGER Divisor
struct _PARTITION_SECTOR PARTITION_SECTOR
CM_INT13_DRIVE_PARAMETER Int13DiskData
unsigned char StartingSector
static const WCHAR Signature[]
PDRIVE_LAYOUT_INFORMATION LayoutBuffer
struct _DISKENTRY * PDISKENTRY
enum _FORMATSTATE * PFORMATSTATE
BOOLEAN GetNextUnformattedPartition(IN PPARTLIST List, OUT PDISKENTRY *pDiskEntry OPTIONAL, OUT PPARTENTRY *pPartEntry)
BOOLEAN CreateExtendedPartition(IN PPARTLIST List, IN OUT PPARTENTRY PartEntry, IN ULONGLONG SectorCount)
ERROR_NUMBER LogicalPartitionCreationChecks(IN PPARTENTRY PartEntry)
PPARTENTRY GetPartition(IN PDISKENTRY DiskEntry, IN ULONG PartitionNumber)
BOOLEAN CreatePrimaryPartition(IN PPARTLIST List, IN OUT PPARTENTRY PartEntry, IN ULONGLONG SectorCount, IN BOOLEAN AutoCreate)
PPARTENTRY FindSupportedSystemPartition(IN PPARTLIST List, IN BOOLEAN ForceSelect, IN PDISKENTRY AlternativeDisk OPTIONAL, IN PPARTENTRY AlternativePart OPTIONAL)
BOOLEAN WritePartitionsToDisk(IN PPARTLIST List)
PPARTLIST CreatePartitionList(VOID)
PULONG MinorVersion OPTIONAL
#define NUM_PARTITION_TYPE_ENTRIES