mirror of
https://github.com/reactos/reactos.git
synced 2024-07-04 03:34:16 +00:00
* fixed a bug in AddPartitionToList (value must be of type FORMATSTATE instead of MEDIA_TYPE
* fixed some warnings svn path=/trunk/; revision=25315
This commit is contained in:
parent
aafd5a63ad
commit
d2e64780de
|
@ -170,7 +170,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
if (SourceCabinet != NULL)
|
if (SourceCabinet != NULL)
|
||||||
{
|
{
|
||||||
Length = wcslen(SourceCabinet);
|
Length = wcslen(SourceCabinet);
|
||||||
Entry->SourceCabinet = RtlAllocateHeap(ProcessHeap,
|
Entry->SourceCabinet = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->SourceCabinet == NULL)
|
if (Entry->SourceCabinet == NULL)
|
||||||
|
@ -188,7 +188,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
|
|
||||||
/* Copy source root path */
|
/* Copy source root path */
|
||||||
Length = wcslen(SourceRootPath);
|
Length = wcslen(SourceRootPath);
|
||||||
Entry->SourceRootPath = RtlAllocateHeap(ProcessHeap,
|
Entry->SourceRootPath = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->SourceRootPath == NULL)
|
if (Entry->SourceRootPath == NULL)
|
||||||
|
@ -207,7 +207,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
if (SourcePath != NULL)
|
if (SourcePath != NULL)
|
||||||
{
|
{
|
||||||
Length = wcslen(SourcePath);
|
Length = wcslen(SourcePath);
|
||||||
Entry->SourcePath = RtlAllocateHeap(ProcessHeap,
|
Entry->SourcePath = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->SourcePath == NULL)
|
if (Entry->SourcePath == NULL)
|
||||||
|
@ -226,7 +226,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
|
|
||||||
/* Copy source file name */
|
/* Copy source file name */
|
||||||
Length = wcslen(SourceFilename);
|
Length = wcslen(SourceFilename);
|
||||||
Entry->SourceFilename = RtlAllocateHeap(ProcessHeap,
|
Entry->SourceFilename = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->SourceFilename == NULL)
|
if (Entry->SourceFilename == NULL)
|
||||||
|
@ -247,7 +247,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
Length = wcslen(TargetDirectory);
|
Length = wcslen(TargetDirectory);
|
||||||
if (TargetDirectory[Length] == '\\')
|
if (TargetDirectory[Length] == '\\')
|
||||||
Length--;
|
Length--;
|
||||||
Entry->TargetDirectory = RtlAllocateHeap(ProcessHeap,
|
Entry->TargetDirectory = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->TargetDirectory == NULL)
|
if (Entry->TargetDirectory == NULL)
|
||||||
|
@ -269,7 +269,7 @@ SetupQueueCopy(HSPFILEQ QueueHandle,
|
||||||
if (TargetFilename != NULL)
|
if (TargetFilename != NULL)
|
||||||
{
|
{
|
||||||
Length = wcslen(TargetFilename);
|
Length = wcslen(TargetFilename);
|
||||||
Entry->TargetFilename = RtlAllocateHeap(ProcessHeap,
|
Entry->TargetFilename = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(Length + 1) * sizeof(WCHAR));
|
(Length + 1) * sizeof(WCHAR));
|
||||||
if (Entry->TargetFilename == NULL)
|
if (Entry->TargetFilename == NULL)
|
||||||
|
|
|
@ -160,7 +160,7 @@ IniCacheAddKey(PINICACHESECTION Section,
|
||||||
sizeof(INICACHEKEY));
|
sizeof(INICACHEKEY));
|
||||||
|
|
||||||
|
|
||||||
Key->Name = RtlAllocateHeap(ProcessHeap,
|
Key->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(NameLength + 1) * sizeof(WCHAR));
|
(NameLength + 1) * sizeof(WCHAR));
|
||||||
if (Key->Name == NULL)
|
if (Key->Name == NULL)
|
||||||
|
@ -180,7 +180,7 @@ IniCacheAddKey(PINICACHESECTION Section,
|
||||||
Key->Name[NameLength] = 0;
|
Key->Name[NameLength] = 0;
|
||||||
|
|
||||||
|
|
||||||
Key->Data = RtlAllocateHeap(ProcessHeap,
|
Key->Data = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(DataLength + 1) * sizeof(WCHAR));
|
(DataLength + 1) * sizeof(WCHAR));
|
||||||
if (Key->Data == NULL)
|
if (Key->Data == NULL)
|
||||||
|
@ -277,7 +277,7 @@ IniCacheAddSection(PINICACHE Cache,
|
||||||
sizeof(INICACHESECTION));
|
sizeof(INICACHESECTION));
|
||||||
|
|
||||||
/* Allocate and initialize section name */
|
/* Allocate and initialize section name */
|
||||||
Section->Name = RtlAllocateHeap(ProcessHeap,
|
Section->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(NameLength + 1) * sizeof(WCHAR));
|
(NameLength + 1) * sizeof(WCHAR));
|
||||||
if (Section->Name == NULL)
|
if (Section->Name == NULL)
|
||||||
|
@ -576,7 +576,7 @@ IniCacheLoad(PINICACHE *Cache,
|
||||||
DPRINT("File size: %lu\n", FileLength);
|
DPRINT("File size: %lu\n", FileLength);
|
||||||
|
|
||||||
/* Allocate file buffer */
|
/* Allocate file buffer */
|
||||||
FileBuffer = RtlAllocateHeap(ProcessHeap,
|
FileBuffer = (CHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
FileLength + 1);
|
FileLength + 1);
|
||||||
if (FileBuffer == NULL)
|
if (FileBuffer == NULL)
|
||||||
|
@ -891,7 +891,7 @@ IniCacheInsertKey(PINICACHESECTION Section,
|
||||||
sizeof(INICACHEKEY));
|
sizeof(INICACHEKEY));
|
||||||
|
|
||||||
/* Allocate name buffer */
|
/* Allocate name buffer */
|
||||||
Key->Name = RtlAllocateHeap(ProcessHeap,
|
Key->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(Name) + 1) * sizeof(WCHAR));
|
(wcslen(Name) + 1) * sizeof(WCHAR));
|
||||||
if (Key->Name == NULL)
|
if (Key->Name == NULL)
|
||||||
|
@ -907,7 +907,7 @@ IniCacheInsertKey(PINICACHESECTION Section,
|
||||||
wcscpy(Key->Name, Name);
|
wcscpy(Key->Name, Name);
|
||||||
|
|
||||||
/* Allocate data buffer */
|
/* Allocate data buffer */
|
||||||
Key->Data = RtlAllocateHeap(ProcessHeap,
|
Key->Data = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(Data) + 1) * sizeof(WCHAR));
|
(wcslen(Data) + 1) * sizeof(WCHAR));
|
||||||
if (Key->Data == NULL)
|
if (Key->Data == NULL)
|
||||||
|
@ -1035,7 +1035,7 @@ IniCacheSave(PINICACHE Cache,
|
||||||
DPRINT1("BufferSize: %lu\n", BufferSize);
|
DPRINT1("BufferSize: %lu\n", BufferSize);
|
||||||
|
|
||||||
/* Allocate file buffer */
|
/* Allocate file buffer */
|
||||||
Buffer = RtlAllocateHeap(ProcessHeap,
|
Buffer = (CHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
BufferSize);
|
BufferSize);
|
||||||
if (Buffer == NULL)
|
if (Buffer == NULL)
|
||||||
|
@ -1153,7 +1153,7 @@ IniCacheAppendSection(PINICACHE Cache,
|
||||||
sizeof(INICACHESECTION));
|
sizeof(INICACHESECTION));
|
||||||
|
|
||||||
/* Allocate and initialize section name */
|
/* Allocate and initialize section name */
|
||||||
Section->Name = RtlAllocateHeap(ProcessHeap,
|
Section->Name = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(Name) + 1) * sizeof(WCHAR));
|
(wcslen(Name) + 1) * sizeof(WCHAR));
|
||||||
if (Section->Name == NULL)
|
if (Section->Name == NULL)
|
||||||
|
|
|
@ -753,7 +753,7 @@ IntroPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
return LICENSE_PAGE;
|
return LICENSE_PAGE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return INTRO_PAGE;
|
return INTRO_PAGE;
|
||||||
|
@ -815,7 +815,7 @@ RepairIntroPage(PINPUT_RECORD Ir)
|
||||||
CONSOLE_SetTextXY(6, 12, "The repair functions are not implemented yet.");
|
CONSOLE_SetTextXY(6, 12, "The repair functions are not implemented yet.");
|
||||||
|
|
||||||
CONSOLE_SetTextXY(8, 15, "\x07 Press R for the Recovery Console.");
|
CONSOLE_SetTextXY(8, 15, "\x07 Press R for the Recovery Console.");
|
||||||
|
|
||||||
CONSOLE_SetTextXY(8, 17, "\x07 Press ESC to return to the main page.");
|
CONSOLE_SetTextXY(8, 17, "\x07 Press ESC to return to the main page.");
|
||||||
|
|
||||||
CONSOLE_SetTextXY(8, 19, "\x07 Press ENTER to reboot your computer.");
|
CONSOLE_SetTextXY(8, 19, "\x07 Press ENTER to reboot your computer.");
|
||||||
|
@ -2806,7 +2806,7 @@ PrepareCopyPage(PINPUT_RECORD Ir)
|
||||||
Ir, POPUP_WAIT_ENTER);
|
Ir, POPUP_WAIT_ENTER);
|
||||||
return(QUIT_PAGE);
|
return(QUIT_PAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PrepareCopyPageInfFile(SetupInf, NULL, Ir))
|
if (!PrepareCopyPageInfFile(SetupInf, NULL, Ir))
|
||||||
{
|
{
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
|
@ -2859,9 +2859,9 @@ PrepareCopyPage(PINPUT_RECORD Ir)
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
InfHandle = INF_OpenBufferedFileA(InfFileData,
|
InfHandle = INF_OpenBufferedFileA((CHAR*) InfFileData,
|
||||||
InfFileSize,
|
InfFileSize,
|
||||||
NULL,
|
(const CHAR*) NULL,
|
||||||
INF_STYLE_WIN4,
|
INF_STYLE_WIN4,
|
||||||
&ErrorLine);
|
&ErrorLine);
|
||||||
if (InfHandle == INVALID_HANDLE_VALUE)
|
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||||
|
@ -3156,12 +3156,12 @@ BootLoaderPage(PINPUT_RECORD Ir)
|
||||||
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_DOWN)) /* DOWN */
|
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_DOWN)) /* DOWN */
|
||||||
{
|
{
|
||||||
CONSOLE_NormalTextXY (8, Line, 48, 1);
|
CONSOLE_NormalTextXY (8, Line, 48, 1);
|
||||||
|
|
||||||
Line++;
|
Line++;
|
||||||
if (Line<12) Line=14;
|
if (Line<12) Line=14;
|
||||||
if (Line>14) Line=12;
|
if (Line>14) Line=12;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CONSOLE_InvertTextXY (8, Line, 48, 1);
|
CONSOLE_InvertTextXY (8, Line, 48, 1);
|
||||||
}
|
}
|
||||||
|
@ -3169,7 +3169,7 @@ BootLoaderPage(PINPUT_RECORD Ir)
|
||||||
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_UP)) /* UP */
|
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_UP)) /* UP */
|
||||||
{
|
{
|
||||||
CONSOLE_NormalTextXY (8, Line, 48, 1);
|
CONSOLE_NormalTextXY (8, Line, 48, 1);
|
||||||
|
|
||||||
Line--;
|
Line--;
|
||||||
if (Line<12) Line=14;
|
if (Line<12) Line=14;
|
||||||
if (Line>14) Line=12;
|
if (Line>14) Line=12;
|
||||||
|
@ -3518,11 +3518,11 @@ RunUSetup(VOID)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FORMAT_PARTITION_PAGE:
|
case FORMAT_PARTITION_PAGE:
|
||||||
Page = FormatPartitionPage(&Ir);
|
Page = (PAGE_NUMBER) FormatPartitionPage(&Ir);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHECK_FILE_SYSTEM_PAGE:
|
case CHECK_FILE_SYSTEM_PAGE:
|
||||||
Page = CheckFileSystemPage(&Ir);
|
Page = (PAGE_NUMBER) CheckFileSystemPage(&Ir);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INSTALL_DIRECTORY_PAGE:
|
case INSTALL_DIRECTORY_PAGE:
|
||||||
|
|
|
@ -194,7 +194,7 @@ WriteConsoleOutputCharacterA(
|
||||||
PCHAR pText;
|
PCHAR pText;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
Buffer = RtlAllocateHeap(
|
Buffer = (CHAR*) RtlAllocateHeap(
|
||||||
ProcessHeap,
|
ProcessHeap,
|
||||||
0,
|
0,
|
||||||
nLength + sizeof(COORD));
|
nLength + sizeof(COORD));
|
||||||
|
@ -242,7 +242,7 @@ WriteConsoleOutputCharacterW(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
Buffer = RtlAllocateHeap(
|
Buffer = (CHAR*) RtlAllocateHeap(
|
||||||
ProcessHeap,
|
ProcessHeap,
|
||||||
0,
|
0,
|
||||||
nLength + sizeof(COORD));
|
nLength + sizeof(COORD));
|
||||||
|
|
|
@ -287,7 +287,7 @@ AddPartitionToList (ULONG DiskNumber,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PartEntry->FormatState = Unknown;
|
PartEntry->FormatState = UnknownFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
InsertTailList (&DiskEntry->PartListHead,
|
InsertTailList (&DiskEntry->PartListHead,
|
||||||
|
@ -514,7 +514,7 @@ SystemConfigurationDataQueryRoutine(PWSTR ValueName,
|
||||||
FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize % sizeof(CM_INT13_DRIVE_PARAMETER) != 0)
|
FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize % sizeof(CM_INT13_DRIVE_PARAMETER) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
*Int13Drives = RtlAllocateHeap(ProcessHeap, 0, FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize);
|
*Int13Drives = (CM_INT13_DRIVE_PARAMETER*) RtlAllocateHeap(ProcessHeap, 0, FullResourceDescriptor->PartialResourceList.PartialDescriptors[i].u.DeviceSpecificData.DataSize);
|
||||||
if (*Int13Drives == NULL)
|
if (*Int13Drives == NULL)
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
memcpy(
|
memcpy(
|
||||||
|
@ -567,7 +567,7 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
swprintf(Name, L"%s\\%lu\\DiskController", ROOT_NAME, AdapterCount);
|
swprintf(Name, L"%s\\%lu\\DiskController", ROOT_NAME, AdapterCount);
|
||||||
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
|
||||||
Name,
|
Name,
|
||||||
|
@ -589,7 +589,7 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
|
||||||
RtlFreeHeap(ProcessHeap, 0, Int13Drives);
|
RtlFreeHeap(ProcessHeap, 0, Int13Drives);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
swprintf(Name, L"%s\\%lu\\DiskController\\0\\DiskPeripheral", ROOT_NAME, AdapterCount);
|
swprintf(Name, L"%s\\%lu\\DiskController\\0\\DiskPeripheral", ROOT_NAME, AdapterCount);
|
||||||
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
|
||||||
Name,
|
Name,
|
||||||
|
@ -605,7 +605,7 @@ EnumerateBiosDiskEntries(PPARTLIST PartList)
|
||||||
DiskCount = 0;
|
DiskCount = 0;
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
BiosDiskEntry = RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, sizeof(BIOSDISKENTRY));
|
BiosDiskEntry = (BIOSDISKENTRY*) RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, sizeof(BIOSDISKENTRY));
|
||||||
if (BiosDiskEntry == NULL)
|
if (BiosDiskEntry == NULL)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
@ -716,7 +716,7 @@ AddDiskToList (HANDLE FileHandle,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mbr = RtlAllocateHeap(ProcessHeap,
|
Mbr = (PARTITION_SECTOR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
DiskGeometry.BytesPerSector);
|
DiskGeometry.BytesPerSector);
|
||||||
|
|
||||||
|
@ -724,7 +724,7 @@ AddDiskToList (HANDLE FileHandle,
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FileOffset.QuadPart = 0;
|
FileOffset.QuadPart = 0;
|
||||||
Status = NtReadFile(FileHandle,
|
Status = NtReadFile(FileHandle,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -785,7 +785,7 @@ AddDiskToList (HANDLE FileHandle,
|
||||||
/* FIXME:
|
/* FIXME:
|
||||||
* Compare the size from bios and the reported size from driver.
|
* Compare the size from bios and the reported size from driver.
|
||||||
* If we have more than one disk with a zero or with the same signatur
|
* If we have more than one disk with a zero or with the same signatur
|
||||||
* we must create new signatures and reboot. After the reboot,
|
* we must create new signatures and reboot. After the reboot,
|
||||||
* it is possible to identify the disks.
|
* it is possible to identify the disks.
|
||||||
*/
|
*/
|
||||||
if (BiosDiskEntry->Signature == Signature &&
|
if (BiosDiskEntry->Signature == Signature &&
|
||||||
|
@ -1036,7 +1036,7 @@ DestroyPartitionList (PPARTLIST List)
|
||||||
{
|
{
|
||||||
Entry = RemoveHeadList(&List->BiosDiskListHead);
|
Entry = RemoveHeadList(&List->BiosDiskListHead);
|
||||||
BiosDiskEntry = CONTAINING_RECORD(Entry, BIOSDISKENTRY, ListEntry);
|
BiosDiskEntry = CONTAINING_RECORD(Entry, BIOSDISKENTRY, ListEntry);
|
||||||
|
|
||||||
RtlFreeHeap(ProcessHeap, 0, BiosDiskEntry);
|
RtlFreeHeap(ProcessHeap, 0, BiosDiskEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1311,7 +1311,7 @@ PrintDiskData (PPARTLIST List,
|
||||||
{
|
{
|
||||||
WriteConsoleOutputCharacterA (StdOutput,
|
WriteConsoleOutputCharacterA (StdOutput,
|
||||||
LineBuffer,
|
LineBuffer,
|
||||||
min (strlen (LineBuffer), Width - 2),
|
min ((USHORT)strlen (LineBuffer), Width - 2),
|
||||||
coPos,
|
coPos,
|
||||||
&Written);
|
&Written);
|
||||||
}
|
}
|
||||||
|
@ -2380,7 +2380,7 @@ WritePartitionsToDisk (PPARTLIST List)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DriveLayout->PartitionCount = PartitionCount;
|
DriveLayout->PartitionCount = PartitionCount;
|
||||||
|
|
||||||
Index = 0;
|
Index = 0;
|
||||||
Entry2 = DiskEntry1->PartListHead.Flink;
|
Entry2 = DiskEntry1->PartListHead.Flink;
|
||||||
while (Entry2 != &DiskEntry1->PartListHead)
|
while (Entry2 != &DiskEntry1->PartListHead)
|
||||||
|
@ -2423,7 +2423,7 @@ WritePartitionsToDisk (PPARTLIST List)
|
||||||
|
|
||||||
/* check if the signature already exist */
|
/* check if the signature already exist */
|
||||||
/* FIXME:
|
/* FIXME:
|
||||||
* Check also signatures from disks, which are
|
* Check also signatures from disks, which are
|
||||||
* not visible (bootable) by the bios.
|
* not visible (bootable) by the bios.
|
||||||
*/
|
*/
|
||||||
Entry2 = List->DiskListHead.Flink;
|
Entry2 = List->DiskListHead.Flink;
|
||||||
|
@ -2442,7 +2442,7 @@ WritePartitionsToDisk (PPARTLIST List)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set one partition entry to dirty, this will update the signature */
|
/* set one partition entry to dirty, this will update the signature */
|
||||||
DriveLayout->PartitionEntry[0].RewritePartition = TRUE;
|
DriveLayout->PartitionEntry[0].RewritePartition = TRUE;
|
||||||
|
|
||||||
|
@ -2466,7 +2466,7 @@ WritePartitionsToDisk (PPARTLIST List)
|
||||||
FILE_ALL_ACCESS,
|
FILE_ALL_ACCESS,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
&Iosb,
|
&Iosb,
|
||||||
0,
|
0,
|
||||||
FILE_SYNCHRONOUS_IO_NONALERT);
|
FILE_SYNCHRONOUS_IO_NONALERT);
|
||||||
|
|
||||||
if (!NT_SUCCESS (Status))
|
if (!NT_SUCCESS (Status))
|
||||||
|
|
|
@ -270,7 +270,7 @@ do_reg_operation(HANDLE KeyHandle,
|
||||||
|
|
||||||
if (Size)
|
if (Size)
|
||||||
{
|
{
|
||||||
Str = RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
|
Str = (WCHAR*) RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
|
||||||
if (Str == NULL)
|
if (Str == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ do_reg_operation(HANDLE KeyHandle,
|
||||||
|
|
||||||
if (Size)
|
if (Size)
|
||||||
{
|
{
|
||||||
Str = RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
|
Str = (WCHAR*) RtlAllocateHeap (ProcessHeap, 0, Size * sizeof(WCHAR));
|
||||||
if (Str == NULL)
|
if (Str == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ do_reg_operation(HANDLE KeyHandle,
|
||||||
|
|
||||||
if (Size)
|
if (Size)
|
||||||
{
|
{
|
||||||
Data = RtlAllocateHeap (ProcessHeap, 0, Size);
|
Data = (unsigned char*) RtlAllocateHeap (ProcessHeap, 0, Size);
|
||||||
if (Data == NULL)
|
if (Data == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -659,7 +659,7 @@ SetInstallPathValue(PUNICODE_STRING InstallPath)
|
||||||
HANDLE KeyHandle;
|
HANDLE KeyHandle;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
/* Create the 'secret' InstallPath key */
|
/* Create the 'secret' InstallPath key */
|
||||||
InitializeObjectAttributes (&ObjectAttributes,
|
InitializeObjectAttributes (&ObjectAttributes,
|
||||||
&KeyName,
|
&KeyName,
|
||||||
OBJ_CASE_INSENSITIVE,
|
OBJ_CASE_INSENSITIVE,
|
||||||
|
@ -703,7 +703,7 @@ SetMountedDeviceValue(CHAR Letter, ULONG Signature, LARGE_INTEGER StartingOffset
|
||||||
|
|
||||||
swprintf(ValueNameBuffer, L"\\DosDevices\\%C:", Letter);
|
swprintf(ValueNameBuffer, L"\\DosDevices\\%C:", Letter);
|
||||||
RtlInitUnicodeString(&ValueName, ValueNameBuffer);
|
RtlInitUnicodeString(&ValueName, ValueNameBuffer);
|
||||||
|
|
||||||
InitializeObjectAttributes (&ObjectAttributes,
|
InitializeObjectAttributes (&ObjectAttributes,
|
||||||
&KeyName,
|
&KeyName,
|
||||||
OBJ_CASE_INSENSITIVE,
|
OBJ_CASE_INSENSITIVE,
|
||||||
|
@ -714,7 +714,7 @@ SetMountedDeviceValue(CHAR Letter, ULONG Signature, LARGE_INTEGER StartingOffset
|
||||||
&ObjectAttributes);
|
&ObjectAttributes);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
Status = NtCreateKey(&KeyHandle,
|
Status = NtCreateKey(&KeyHandle,
|
||||||
KEY_ALL_ACCESS,
|
KEY_ALL_ACCESS,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -187,7 +187,7 @@ CreateComputerTypeList(HINF InfFile)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserData = RtlAllocateHeap(ProcessHeap,
|
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
||||||
if (UserData == NULL)
|
if (UserData == NULL)
|
||||||
|
@ -308,7 +308,7 @@ GetDisplayIdentifier(PWSTR Identifier,
|
||||||
|
|
||||||
BufferLength = sizeof(KEY_VALUE_PARTIAL_INFORMATION) +
|
BufferLength = sizeof(KEY_VALUE_PARTIAL_INFORMATION) +
|
||||||
256 * sizeof(WCHAR);
|
256 * sizeof(WCHAR);
|
||||||
ValueInfo = RtlAllocateHeap(RtlGetProcessHeap(),
|
ValueInfo = (KEY_VALUE_PARTIAL_INFORMATION*) RtlAllocateHeap(RtlGetProcessHeap(),
|
||||||
0,
|
0,
|
||||||
BufferLength);
|
BufferLength);
|
||||||
if (ValueInfo == NULL)
|
if (ValueInfo == NULL)
|
||||||
|
@ -443,7 +443,7 @@ CreateDisplayDriverList(HINF InfFile)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserData = RtlAllocateHeap(ProcessHeap,
|
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
||||||
if (UserData == NULL)
|
if (UserData == NULL)
|
||||||
|
@ -486,7 +486,7 @@ ProcessComputerFiles(HINF InfFile, PGENERIC_LIST List, PWCHAR* AdditionalSection
|
||||||
}
|
}
|
||||||
|
|
||||||
wcscpy(SectionName, L"Files.");
|
wcscpy(SectionName, L"Files.");
|
||||||
wcscat(SectionName, Entry->UserData);
|
wcscat(SectionName, (const wchar_t*) Entry->UserData);
|
||||||
*AdditionalSectionName = SectionName;
|
*AdditionalSectionName = SectionName;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -514,7 +514,7 @@ ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SetupFindFirstLineW(InfFile, L"Display", Entry->UserData, &Context))
|
if (!SetupFindFirstLineW(InfFile, L"Display", (WCHAR*) Entry->UserData, &Context))
|
||||||
{
|
{
|
||||||
DPRINT("SetupFindFirstLineW() failed\n");
|
DPRINT("SetupFindFirstLineW() failed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -554,7 +554,7 @@ ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
|
||||||
}
|
}
|
||||||
Width = wcstoul(Buffer, NULL, 10);
|
Width = wcstoul(Buffer, NULL, 10);
|
||||||
Status = RtlWriteRegistryValue(RTL_REGISTRY_ABSOLUTE,
|
Status = RtlWriteRegistryValue(RTL_REGISTRY_ABSOLUTE,
|
||||||
RegPath,
|
RegPath,
|
||||||
L"DefaultSettings.XResolution",
|
L"DefaultSettings.XResolution",
|
||||||
REG_DWORD,
|
REG_DWORD,
|
||||||
&Width,
|
&Width,
|
||||||
|
@ -565,7 +565,7 @@ ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!INF_GetDataField(&Context, 5, &Buffer))
|
if (!INF_GetDataField(&Context, 5, &Buffer))
|
||||||
{
|
{
|
||||||
DPRINT("INF_GetDataField() failed\n");
|
DPRINT("INF_GetDataField() failed\n");
|
||||||
|
@ -637,7 +637,7 @@ CreateKeyboardDriverList(HINF InfFile)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserData = RtlAllocateHeap(ProcessHeap,
|
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
||||||
if (UserData == NULL)
|
if (UserData == NULL)
|
||||||
|
@ -695,7 +695,7 @@ CreateKeyboardLayoutList(HINF InfFile)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserData = RtlAllocateHeap(ProcessHeap,
|
UserData = (WCHAR*) RtlAllocateHeap(ProcessHeap,
|
||||||
0,
|
0,
|
||||||
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
(wcslen(KeyName) + 1) * sizeof(WCHAR));
|
||||||
if (UserData == NULL)
|
if (UserData == NULL)
|
||||||
|
|
Loading…
Reference in a new issue