21 #define AUTO_DRIVE MAXULONG 23 #define PARTITION_MAGIC 0xaa55 25 #define EFI_PMBR_OSTYPE_EFI 0xEE 239 if (LayoutInfo ==
NULL)
260 &PARTITION_BASIC_DATA_GUID,
287 if (LayoutInfo ==
NULL)
294 for (
i = 0;
i < 4; ++
i)
297 if (LayoutInfo->PartitionEntry[
i].StartingOffset.QuadPart ==
PartitionInfo.StartingOffset.QuadPart)
342 sizeof(
ULONG) * DiskCount,
350 for (
i = 0;
i < DiskCount; ++
i)
406 for (
i = 0;
i < DiskCount; ++
i)
409 for (
j = 0;
j < DiskCount; ++
j)
421 while (Devices[
k] != -1)
423 if (++
k >= DiskCount)
626 if (NtDeviceName ==
NULL || NtSystemPath ==
NULL)
658 for (
i = DriveLetter;
i <=
'Z'; ++
i)
678 for (
i = DriveLetter;
i <=
'Z'; ++
i)
927 PSTR Buffer1, Buffer2, LoadOptions;
944 if (Buffer1 ==
NULL || Buffer2 ==
NULL)
955 Last =
strrchr(LoaderBlock->NtBootPathName,
'\\');
969 Last =
strrchr(LoaderBlock->NtBootPathName,
'\\');
980 NtSystemPath[0] =
'X';
981 NtSystemPath[1] =
':';
999 for (
i = 0;
i < DiskCount; ++
i)
1002 sprintf(Buffer1,
"\\Device\\Harddisk%d\\Partition%d",
i, 0);
1025 sprintf(Buffer2,
"\\DosDevices\\PhysicalDrive%d",
i);
1036 RealDiskCount =
i + 1;
1057 if (LoaderBlock->LoadOptions !=
NULL)
1059 LoadOptions =
_strupr(LoaderBlock->LoadOptions);
1067 if (LoadOptions !=
NULL &&
1068 strstr(LoadOptions,
"MININT") != 0 &&
1073 *NtSystemPath =
'X';
1081 if (RealDiskCount > DiskCount)
1083 DiskCount = RealDiskCount;
1091 for (
i = 0;
i < DiskCount; ++
i)
1094 if (Devices !=
NULL)
1096 HarddiskCount = Devices[
i];
1108 SystemFound =
FALSE;
1109 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, 1);
1115 for (PartitionCount = 1; ; ++PartitionCount)
1117 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1135 for (PartitionCount = 2; ; ++PartitionCount)
1151 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1158 for (PartitionCount = 1; ; ++PartitionCount)
1160 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1181 if (LayoutInfo !=
NULL)
1186 HarddiskCount =
i + 1;
1190 for (
i = 0;
i < DiskCount; ++
i)
1193 if (Devices !=
NULL)
1195 HarddiskCount = Devices[
i];
1211 for (PartitionCount = 1; ; ++PartitionCount)
1213 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1227 if (LayoutInfo !=
NULL)
1234 for (
i = 0;
i < DiskCount; ++
i)
1237 if (Devices !=
NULL)
1239 HarddiskCount = Devices[
i];
1256 for (PartitionCount = 1; ; ++PartitionCount)
1258 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1272 for (PartitionCount = 1; ; ++PartitionCount)
1276 swprintf(
Buffer,
L"\\Device\\Harddisk%d\\Partition%d", HarddiskCount, PartitionCount);
1280 if (LayoutInfo !=
NULL)
1297 if (Devices !=
NULL)
1326 if (DriveLetter != 0)
1328 if (DriveLetter != 0xFF)
1330 *NtSystemPath = DriveLetter;
1357 if (DriveLetter >
'Z')
1364 if (DriveLetter >
'Z')
1369 *NtSystemPath =
'Z';
1374 *NtSystemPath = DriveLetter;
1455 if (EndingSector > MaxSector)
1458 DPRINT1(
"FSTUB: entry is invalid\n");
1461 DPRINT1(
"FSTUB: end %#I64x\n", EndingSector);
1462 DPRINT1(
"FSTUB: max %#I64x\n", MaxSector);
1468 DPRINT1(
"FSTUB: entry is invalid\n");
1471 DPRINT1(
"FSTUB: end %#I64x\n", EndingSector);
1472 DPRINT1(
"FSTUB: maxOffset %#I64x\n", MaxOffset);
1487 IN ULONG ConventionalCylinders,
1492 ULONG StartingCylinder, EndingCylinder;
1493 ULONG StartingTrack, EndingTrack;
1494 ULONG StartingSector, EndingSector;
1501 FirstSector.
QuadPart = PartitionOffset->QuadPart >> ShiftCount;
1502 SectorCount.QuadPart = PartitionLength->QuadPart >> ShiftCount;
1508 StartingCylinder = FirstSector.
LowPart / SectorsPerCylinder;
1509 EndingCylinder = LastSector / SectorsPerCylinder;
1512 if (!ConventionalCylinders) ConventionalCylinders = 1024;
1515 if (StartingCylinder >= ConventionalCylinders)
1518 StartingCylinder = ConventionalCylinders - 1;
1520 if (EndingCylinder >= ConventionalCylinders)
1523 EndingCylinder = ConventionalCylinders - 1;
1532 Remainder = LastSector % SectorsPerCylinder;
1537 PartitionDescriptor->StartingCylinderMsb = (
UCHAR)StartingCylinder;
1538 PartitionDescriptor->EndingCylinderMsb = (
UCHAR)EndingCylinder;
1541 PartitionDescriptor->StartingTrack = (
UCHAR)StartingTrack;
1542 PartitionDescriptor->EndingTrack = (
UCHAR)EndingTrack;
1545 StartingCylinder = ((StartingSector + 1) & 0x3F) |
1546 ((StartingCylinder >> 2) & 0xC0);
1547 EndingCylinder = ((EndingSector + 1) & 0x3F) |
1548 ((EndingCylinder >> 2) & 0xC0);
1551 PartitionDescriptor->StartingCylinderLsb = (
UCHAR)StartingCylinder;
1552 PartitionDescriptor->EndingCylinderLsb = (
UCHAR)EndingCylinder;
1568 *ConventionalCylinders = 0;
1575 if (!DiskGeometry)
goto Cleanup;
1623 *ConventionalCylinders = 1024;
1718 if (PartitionDescriptor->
PartitionType != MbrTypeIdentifier)
1752 ULONG PartitionMaxOffset, PartitionLength;
1758 if (PartitionMaxOffset > MaxOffset)
1785 LONGLONG EndSector, MaxSector, StartOffset;
1828 MaxSector = EndSector << 1;
1829 DPRINT(
"FSTUB: DiskSize = %#I64x, MaxSector = %#I64x\n",
1830 DiskGeometryEx.
DiskSize, MaxSector);
1885 if (IsEzDrive && (
Offset.QuadPart == 512))
Offset.QuadPart = 0;
1891 DPRINT1(
"FSTUB: (IoReadPartitionTable) No 0xaa55 found in " 1892 "partition table %d\n",
j + 1);
1911 DPRINT(
"FSTUB: Partition Table %d:\n",
j);
1918 DPRINT(
"Partition Entry %d,%d: type %#x %s\n",
1922 (PartitionDescriptor->
ActiveFlag) ?
"Active" :
"");
1923 DPRINT(
"\tOffset %#08lx for %#08lx Sectors\n",
1937 MaxSector)) && (
j == 0))
1951 DPRINT1(
"FSTUB: Multiple container partitions found in " 1952 "partition table %d\n - table is invalid\n",
1992 if (!DriveLayoutInfo)
2031 StartOffset = VolumeOffset.
QuadPart;
2037 StartOffset =
Offset.QuadPart;
2105 if (IsPrimary) VolumeOffset =
Offset;
2109 DPRINT1(
"FSTUB: MaxSector now = %I64d\n", MaxSector);
2120 (
j == 0) && (MbrFound) && (
IsEmpty))
2125 if ((BootSectorInfo->
JumpByte[0] == 0xeb) ||
2126 (BootSectorInfo->
JumpByte[0] == 0xe9))
2129 DPRINT1(
"FSTUB: Jump byte %#x found along with empty partition " 2130 "table - disk is a super floppy and has no valid MBR\n",
2143 DPRINT1(
"FSTUB: Drive %#p has no valid MBR. Make it into a " 2146 DPRINT1(
"FSTUB: Drive has %I64d sectors and is %#016I64x " 2148 EndSector, DiskGeometryEx.
DiskSize);
2169 (*PartitionBuffer)->Signature = 1;
2181 (*PartitionBuffer)->PartitionCount = ++
i;
2184 if (!
i) (*PartitionBuffer)->Signature = 0;
2279 if (IsEzDrive && (
Offset.QuadPart == 512))
Offset.QuadPart = 0;
2363 if (IsPrimary) VolumeOffset =
Offset;
2406 ULONG ConventionalCylinders;
2512 if (IsEzDrive && (
Offset.QuadPart == 512))
Offset.QuadPart = 0;
2588 ConventionalCylinders,
2595 Entry[
j].StartingSector = 0;
2596 Entry[
j].PartitionLength = 0;
2597 Entry[
j].StartingTrack = 0;
2598 Entry[
j].EndingTrack = 0;
2599 Entry[
j].StartingCylinder = 0;
2600 Entry[
j].EndingCylinder = 0;
2623 if (IsEzDrive && !
Offset.QuadPart)
Offset.QuadPart = 512;
2661 if (IsEzDrive && (
Offset.QuadPart == 512))
Offset.QuadPart = 0;
2666 if (IsMbr) ExtendedOffset = NextOffset;
2755 NtSystemPathString);
NTSTATUS FASTCALL IoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG PartitionNumber, IN ULONG PartitionType)
#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
LARGE_INTEGER StartingOffset
#define GET_STARTING_SECTOR(p)
#define STATUS_INSUFFICIENT_RESOURCES
#define EFI_PMBR_OSTYPE_EFI
_In_ PFCB _In_ LONGLONG StartingOffset
#define OBJ_CASE_INSENSITIVE
PIRP NTAPI IoBuildSynchronousFsdRequest(IN ULONG MajorFunction, IN PDEVICE_OBJECT DeviceObject, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER StartingOffset, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
ACPI_SIZE strlen(const char *String)
IN BOOLEAN OUT PSTR Buffer
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
#define STATUS_INVALID_PARAMETER
#define BooleanFlagOn(F, SF)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
char * strstr(char *String1, char *String2)
VOID NTAPI HalpCalculateChsValues(IN PLARGE_INTEGER PartitionOffset, IN PLARGE_INTEGER PartitionLength, IN CCHAR ShiftCount, IN ULONG SectorsPerTrack, IN ULONG NumberOfTracks, IN ULONG ConventionalCylinders, OUT PPARTITION_DESCRIPTOR PartitionDescriptor)
struct _MOUNTMGR_MOUNT_POINT MOUNTMGR_MOUNT_POINT
#define PARTITION_EZDRIVE
VOID HalpEnableAutomaticDriveLetterAssignment(VOID)
#define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS
#define STATUS_BAD_MASTER_BOOT_RECORD
#define PARTITION_TABLE_OFFSET
#define IOCTL_MOUNTMGR_CREATE_POINT
#define POOL_COLD_ALLOCATION
NTSTATUS NTAPI IoGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName, IN ACCESS_MASK DesiredAccess, OUT PFILE_OBJECT *FileObject, OUT PDEVICE_OBJECT *DeviceObject)
#define IsContainerPartition(PartitionType)
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
_In_ ULONG _In_ ULONG _In_ ULONG NumberOfHeads
_In_ ULONG _In_ ULONG PartitionNumber
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
#define SET_PARTITION_LENGTH(p, l)
struct _DISK_LAYOUT * PDISK_LAYOUT
NTSTATUS HalpDeleteMountLetter(UCHAR DriveLetter)
PARTITION_INFORMATION PartitionEntry[4]
NTSTATUS HalpQueryPartitionType(IN PUNICODE_STRING DeviceName, IN PDRIVE_LAYOUT_INFORMATION LayoutInfo, OUT PPARTITION_TYPE PartitionType)
#define RtlMoveMemory(Destination, Source, Length)
struct _REG_DISK_MOUNT_INFO REG_DISK_MOUNT_INFO
#define STATUS_BUFFER_TOO_SMALL
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
VOID FASTCALL xHalExamineMBR(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG MbrTypeIdentifier, OUT PVOID *MbrBuffer)
#define PARTITION_ENTRY_UNUSED
#define sprintf(buf, format,...)
__GNU_EXTENSION typedef __int64 * PLONGLONG
#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
_In_ ULONG _In_ ULONG SectorsPerTrack
struct _REG_DISK_MOUNT_INFO * PREG_DISK_MOUNT_INFO
#define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER
DECLSPEC_NORETURN VOID NTAPI KeBugCheck(ULONG BugCheckCode)
VOID FASTCALL xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
#define FILE_REMOVABLE_MEDIA
NTSTATUS FASTCALL xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG PartitionNumber, IN ULONG PartitionType)
_In_ PVOID _In_ ULONG Event
_In_ ULONG _In_ BOOLEAN _Out_ struct _DRIVE_LAYOUT_INFORMATION ** PartitionBuffer
#define SL_OVERRIDE_VERIFY_VOLUME
#define IOCTL_STORAGE_GET_DEVICE_NUMBER
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
PDEVICE_OBJECT NTAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT DeviceObject)
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
UCHAR HalpNextDriveLetter(IN PUNICODE_STRING DeviceName, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, BOOLEAN IsRemovable)
#define GET_PARTITION_LENGTH(p)
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
NTSTATUS FASTCALL IoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, IN OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
NTSTATUS FASTCALL xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN BOOLEAN ReturnRecognizedPartitions, IN OUT PDRIVE_LAYOUT_INFORMATION *PartitionBuffer)
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
enum _PARTITION_TYPE * PPARTITION_TYPE
#define BOOT_RECORD_SIGNATURE
#define NT_SUCCESS(StatCode)
#define IsRecognizedPartition(PartitionType)
#define ObDereferenceObject
struct _PARTITION_DESCRIPTOR * PPARTITION_DESCRIPTOR
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EX * PartitionInfo
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
PARTITION_TABLE PartitionTable[1]
VOID NTAPI FstubFixupEfiPartition(IN PPARTITION_DESCRIPTOR PartitionDescriptor, IN ULONGLONG MaxOffset)
#define FILE_READ_ATTRIBUTES
static PPARTENTRY SystemPartition
#define ExAllocatePoolWithTag(hernya, size, tag)
NTSYSAPI NTSTATUS NTAPI ZwOpenFile(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_ ULONG ShareAccess, _In_ ULONG OpenOptions)
NTSTATUS HalpSetMountLetter(IN PUNICODE_STRING DeviceName, UCHAR DriveLetter)
BOOLEAN NTAPI HalpIsValidPartitionEntry(IN PPARTITION_DESCRIPTOR Entry, IN ULONGLONG MaxOffset, IN ULONGLONG MaxSector)
NTSTATUS FASTCALL xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG SectorsPerTrack, IN ULONG NumberOfHeads, IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
_In_ ULONG _In_ BOOLEAN ReturnRecognizedPartitions
#define BOOT_SIGNATURE_OFFSET
NTSTATUS NTAPI HalpGetFullGeometry(IN PDEVICE_OBJECT DeviceObject, OUT PDISK_GEOMETRY_EX Geometry)
#define STATUS_NO_DATA_DETECTED
static const WCHAR Cleanup[]
int _cdecl swprintf(const WCHAR *,...)
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
NTSYSAPI VOID NTAPI RtlInitString(PSTRING DestinationString, PCSZ SourceString)
#define IOCTL_DISK_GET_DRIVE_LAYOUT
_In_ ULONG _In_ ULONG Offset
struct _MOUNTMGR_CREATE_POINT_INPUT MOUNTMGR_CREATE_POINT_INPUT
VOID FASTCALL xHalGetPartialGeometry(IN PDEVICE_OBJECT DeviceObject, IN PULONG ConventionalCylinders, IN PLONGLONG DiskSize)
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
BOOLEAN IsSuperFloppy(IN PDISKENTRY DiskEntry)
#define KeInitializeEvent(pEvt, foo, foo2)
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
#define STATUS_BUFFER_OVERFLOW
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
#define IsFTPartition(PartitionType)
#define FIELD_OFFSET(t, f)
static OUT PIO_STATUS_BLOCK IoStatusBlock
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
const WCHAR DiskMountString[]
PULONG IopComputeHarddiskDerangements(IN ULONG DiskCount)
NTSYSAPI BOOLEAN NTAPI RtlPrefixUnicodeString(IN PUNICODE_STRING String1, IN PUNICODE_STRING String2, IN BOOLEAN CaseInSensitive)
BOOLEAN HalpIsOldStyleFloppy(PUNICODE_STRING DeviceName)
VOID FASTCALL IoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PSTRING NtDeviceName, OUT PUCHAR NtSystemPath, OUT PSTRING NtSystemPathString)
PIRP NTAPI IoBuildDeviceIoControlRequest(IN ULONG IoControlCode, IN PDEVICE_OBJECT DeviceObject, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN InternalDeviceIoControl, IN PKEVENT Event, IN PIO_STATUS_BLOCK IoStatusBlock)
_Must_inspect_result_ typedef _In_ ULONG TableEntry
#define FILE_SYNCHRONOUS_IO_NONALERT
char * strcpy(char *DstString, const char *SrcString)
#define NUM_PARTITION_TABLE_ENTRIES
enum _DISK_MANAGER DISK_MANAGER
NTSTATUS FASTCALL HalpQueryDriveLayout(IN PUNICODE_STRING DeviceName, OUT PDRIVE_LAYOUT_INFORMATION *LayoutInfo)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
VOID FASTCALL HalExamineMBR(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG MbrTypeIdentifier, OUT PVOID *MbrBuffer)
#define InitializeObjectAttributes(p, n, a, r, s)
#define RtlCopyMemory(Destination, Source, Length)
NTSTATUS HalpNextMountLetter(IN PUNICODE_STRING DeviceName, OUT PUCHAR DriveLetter)
_In_ PCHAR _In_ ULONG DeviceNumber
enum _PARTITION_TYPE PARTITION_TYPE
VOID NTAPI KeClearEvent(IN PKEVENT Event)
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
#define ExFreePoolWithTag(_P, _T)
#define UInt32x32To64(a, b)
#define DISK_SIGNATURE_OFFSET
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
NTSTATUS FASTCALL IoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject, IN ULONG SectorSize, IN ULONG SectorsPerTrack, IN ULONG NumberOfHeads, IN PDRIVE_LAYOUT_INFORMATION PartitionBuffer)
base of all file and directory entries
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
struct _BOOT_SECTOR_INFO * PBOOT_SECTOR_INFO
#define RtlCompareMemory(s1, s2, l)
#define IOCTL_DISK_GET_PARTITION_INFO_EX
#define IOCTL_MOUNTMGR_DELETE_POINTS
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_In_ LARGE_INTEGER _Out_opt_ PLARGE_INTEGER Remainder
BOOLEAN IoRemoteBootClient