mirror of
https://github.com/reactos/reactos.git
synced 2024-08-03 01:50:57 +00:00
Remove some code duplication when calling PopupError
Add ConAttachConsole stub svn path=/trunk/; revision=23840
This commit is contained in:
parent
8b597b0970
commit
1ebc320243
|
@ -36,21 +36,21 @@
|
||||||
HANDLE StdInput = INVALID_HANDLE_VALUE;
|
HANDLE StdInput = INVALID_HANDLE_VALUE;
|
||||||
HANDLE StdOutput = INVALID_HANDLE_VALUE;
|
HANDLE StdOutput = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
static SHORT xScreen = 0;
|
SHORT xScreen = 0;
|
||||||
static SHORT yScreen = 0;
|
SHORT yScreen = 0;
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
#ifndef WIN32_USETUP
|
||||||
|
|
||||||
BOOL WINAPI
|
BOOL WINAPI
|
||||||
ConAllocConsole(
|
ConAllocConsole(VOID)
|
||||||
IN DWORD dwProcessId)
|
|
||||||
{
|
{
|
||||||
UNICODE_STRING ScreenName = RTL_CONSTANT_STRING(L"\\??\\BlueScreen");
|
UNICODE_STRING ScreenName = RTL_CONSTANT_STRING(L"\\??\\BlueScreen");
|
||||||
UNICODE_STRING KeyboardName = RTL_CONSTANT_STRING(L"\\Device\\KeyboardClass0");
|
UNICODE_STRING KeyboardName = RTL_CONSTANT_STRING(L"\\Device\\KeyboardClass0");
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
IO_STATUS_BLOCK IoStatusBlock;
|
IO_STATUS_BLOCK IoStatusBlock;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
|
||||||
|
|
||||||
/* Open the screen */
|
/* Open the screen */
|
||||||
InitializeObjectAttributes(
|
InitializeObjectAttributes(
|
||||||
|
@ -86,15 +86,16 @@ ConAllocConsole(
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!GetConsoleScreenBufferInfo(StdOutput, &csbi))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
xScreen = csbi.dwSize.X;
|
|
||||||
yScreen = csbi.dwSize.Y;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL WINAPI
|
||||||
|
ConAttachConsole(
|
||||||
|
IN DWORD dwProcessId)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL WINAPI
|
BOOL WINAPI
|
||||||
ConFreeConsole(VOID)
|
ConFreeConsole(VOID)
|
||||||
{
|
{
|
||||||
|
@ -138,6 +139,21 @@ ConWriteConsole(
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HANDLE WINAPI
|
||||||
|
ConGetStdHandle(
|
||||||
|
IN DWORD nStdHandle)
|
||||||
|
{
|
||||||
|
switch (nStdHandle)
|
||||||
|
{
|
||||||
|
case STD_INPUT_HANDLE:
|
||||||
|
return StdInput;
|
||||||
|
case STD_OUTPUT_HANDLE:
|
||||||
|
return StdOutput;
|
||||||
|
default:
|
||||||
|
return INVALID_HANDLE_VALUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOOL WINAPI
|
BOOL WINAPI
|
||||||
ConReadConsoleInput(
|
ConReadConsoleInput(
|
||||||
IN HANDLE hConsoleInput,
|
IN HANDLE hConsoleInput,
|
||||||
|
@ -436,6 +452,8 @@ ConSetConsoleTextAttribute(
|
||||||
return NT_SUCCESS(Status);
|
return NT_SUCCESS(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* !WIN32_USETUP */
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CONSOLE_ConInKey(
|
CONSOLE_ConInKey(
|
||||||
OUT PINPUT_RECORD Buffer)
|
OUT PINPUT_RECORD Buffer)
|
||||||
|
|
|
@ -27,15 +27,31 @@
|
||||||
#ifndef __CONSOLE_H__
|
#ifndef __CONSOLE_H__
|
||||||
#define __CONSOLE_H__
|
#define __CONSOLE_H__
|
||||||
|
|
||||||
|
#define FOREGROUND_WHITE (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)
|
||||||
|
#define FOREGROUND_YELLOW (FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN)
|
||||||
|
#define BACKGROUND_WHITE (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE)
|
||||||
|
|
||||||
|
extern HANDLE StdInput, StdOutput;
|
||||||
|
extern SHORT xScreen, yScreen;
|
||||||
|
|
||||||
|
#ifdef WIN32_USETUP
|
||||||
|
|
||||||
|
#define NtDisplayString(str) printf("%S", (str)->Buffer)
|
||||||
|
#define NtRaiseHardError(status, a, b, c, d, e) exit(1)
|
||||||
|
|
||||||
|
#else /* WIN32_USETUP */
|
||||||
|
|
||||||
#undef WriteConsole
|
#undef WriteConsole
|
||||||
#undef ReadConsoleInput
|
#undef ReadConsoleInput
|
||||||
#undef FillConsoleOutputCharacter
|
#undef FillConsoleOutputCharacter
|
||||||
|
|
||||||
#define AllocConsole ConAllocConsole
|
#define AllocConsole ConAllocConsole
|
||||||
|
#define AttachConsole ConAttachConsole
|
||||||
#define FillConsoleOutputAttribute ConFillConsoleOutputAttribute
|
#define FillConsoleOutputAttribute ConFillConsoleOutputAttribute
|
||||||
#define FillConsoleOutputCharacterA ConFillConsoleOutputCharacterA
|
#define FillConsoleOutputCharacterA ConFillConsoleOutputCharacterA
|
||||||
#define FreeConsole ConFreeConsole
|
#define FreeConsole ConFreeConsole
|
||||||
#define GetConsoleScreenBufferInfo ConGetConsoleScreenBufferInfo
|
#define GetConsoleScreenBufferInfo ConGetConsoleScreenBufferInfo
|
||||||
|
#define GetStdHandle ConGetStdHandle
|
||||||
#define ReadConsoleInput ConReadConsoleInput
|
#define ReadConsoleInput ConReadConsoleInput
|
||||||
#define SetConsoleCursorInfo ConSetConsoleCursorInfo
|
#define SetConsoleCursorInfo ConSetConsoleCursorInfo
|
||||||
#define SetConsoleCursorPosition ConSetConsoleCursorPosition
|
#define SetConsoleCursorPosition ConSetConsoleCursorPosition
|
||||||
|
@ -44,15 +60,8 @@
|
||||||
#define WriteConsoleOutputCharacterA ConWriteConsoleOutputCharacterA
|
#define WriteConsoleOutputCharacterA ConWriteConsoleOutputCharacterA
|
||||||
#define WriteConsoleOutputCharacterW ConWriteConsoleOutputCharacterW
|
#define WriteConsoleOutputCharacterW ConWriteConsoleOutputCharacterW
|
||||||
|
|
||||||
#define FOREGROUND_WHITE (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)
|
|
||||||
#define FOREGROUND_YELLOW (FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN)
|
|
||||||
#define BACKGROUND_WHITE (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE)
|
|
||||||
|
|
||||||
extern HANDLE StdInput, StdOutput;
|
|
||||||
|
|
||||||
BOOL WINAPI
|
BOOL WINAPI
|
||||||
ConAllocConsole(
|
ConAllocConsole(VOID);
|
||||||
IN DWORD dwProcessId);
|
|
||||||
|
|
||||||
BOOL WINAPI
|
BOOL WINAPI
|
||||||
ConFillConsoleOutputAttribute(
|
ConFillConsoleOutputAttribute(
|
||||||
|
@ -78,6 +87,10 @@ ConGetConsoleScreenBufferInfo(
|
||||||
IN HANDLE hConsoleOutput,
|
IN HANDLE hConsoleOutput,
|
||||||
OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
|
OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
|
||||||
|
|
||||||
|
HANDLE WINAPI
|
||||||
|
ConGetStdHandle(
|
||||||
|
IN DWORD nStdHandle);
|
||||||
|
|
||||||
BOOL WINAPI
|
BOOL WINAPI
|
||||||
ConReadConsoleInput(
|
ConReadConsoleInput(
|
||||||
IN HANDLE hConsoleInput,
|
IN HANDLE hConsoleInput,
|
||||||
|
@ -124,6 +137,7 @@ ConWriteConsoleOutputCharacterA(
|
||||||
IN COORD dwWriteCoord,
|
IN COORD dwWriteCoord,
|
||||||
OUT LPDWORD lpNumberOfCharsWritten);
|
OUT LPDWORD lpNumberOfCharsWritten);
|
||||||
|
|
||||||
|
#endif /* !WIN32_USETUP */
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
CONSOLE_ClearScreen(VOID);
|
CONSOLE_ClearScreen(VOID);
|
||||||
|
|
|
@ -141,9 +141,15 @@ PrintString(char* fmt,...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#define POPUP_WAIT_NONE 0
|
||||||
|
#define POPUP_WAIT_ANY_KEY 1
|
||||||
|
#define POPUP_WAIT_ENTER 2
|
||||||
|
|
||||||
static VOID
|
static VOID
|
||||||
PopupError(PCHAR Text,
|
PopupError(PCHAR Text,
|
||||||
PCHAR Status)
|
PCHAR Status,
|
||||||
|
PINPUT_RECORD Ir,
|
||||||
|
ULONG WaitEvent)
|
||||||
{
|
{
|
||||||
SHORT xScreen;
|
SHORT xScreen;
|
||||||
SHORT yScreen;
|
SHORT yScreen;
|
||||||
|
@ -364,6 +370,20 @@ PopupError(PCHAR Text,
|
||||||
coPos,
|
coPos,
|
||||||
&Written);
|
&Written);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (WaitEvent == POPUP_WAIT_NONE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
while (TRUE)
|
||||||
|
{
|
||||||
|
CONSOLE_ConInKey(Ir);
|
||||||
|
|
||||||
|
if (WaitEvent == POPUP_WAIT_ANY_KEY
|
||||||
|
|| Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -384,7 +404,8 @@ ConfirmQuit(PINPUT_RECORD Ir)
|
||||||
"\n"
|
"\n"
|
||||||
" \x07 Press ENTER to continue Setup.\n"
|
" \x07 Press ENTER to continue Setup.\n"
|
||||||
" \x07 Press F3 to quit Setup.",
|
" \x07 Press F3 to quit Setup.",
|
||||||
"F3= Quit ENTER = Continue");
|
"F3= Quit ENTER = Continue",
|
||||||
|
NULL, POPUP_WAIT_NONE);
|
||||||
|
|
||||||
while(TRUE)
|
while(TRUE)
|
||||||
{
|
{
|
||||||
|
@ -560,56 +581,35 @@ SetupStartPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
CONSOLE_PrintTextXY(6, 15, "NtQuerySystemInformation() failed (Status 0x%08lx)", Status);
|
CONSOLE_PrintTextXY(6, 15, "NtQuerySystemInformation() failed (Status 0x%08lx)", Status);
|
||||||
PopupError("Setup could not retrieve system drive information.\n",
|
PopupError("Setup could not retrieve system drive information.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
while(TRUE)
|
Ir, POPUP_WAIT_ENTER);
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Sdi.NumberOfDisks == 0)
|
if (Sdi.NumberOfDisks == 0)
|
||||||
{
|
{
|
||||||
PopupError("Setup could not find a harddisk.\n",
|
PopupError("Setup could not find a harddisk.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
while(TRUE)
|
Ir, POPUP_WAIT_ENTER);
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the source path and source root path */
|
/* Get the source path and source root path */
|
||||||
Status = GetSourcePaths(&SourcePath,
|
Status = GetSourcePaths(&SourcePath,
|
||||||
&SourceRootPath);
|
&SourceRootPath);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
CONSOLE_PrintTextXY(6, 15, "GetSourcePath() failed (Status 0x%08lx)", Status);
|
CONSOLE_PrintTextXY(6, 15, "GetSourcePaths() failed (Status 0x%08lx)", Status);
|
||||||
PopupError("Setup could not find its source drive.\n",
|
PopupError("Setup could not find its source drive.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
while(TRUE)
|
Ir, POPUP_WAIT_ENTER);
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
#if 0
|
#if 0
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PrintTextXY(6, 15, "SourcePath: '%wZ'", &SourcePath);
|
CONSOLE_PrintTextXY(6, 15, "SourcePath: '%wZ'", &SourcePath);
|
||||||
PrintTextXY(6, 16, "SourceRootPath: '%wZ'", &SourceRootPath);
|
CONSOLE_PrintTextXY(6, 16, "SourceRootPath: '%wZ'", &SourceRootPath);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -624,70 +624,38 @@ SetupStartPage(PINPUT_RECORD Ir)
|
||||||
if (SetupInf == INVALID_HANDLE_VALUE)
|
if (SetupInf == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
PopupError("Setup failed to load the file TXTSETUP.SIF.\n",
|
PopupError("Setup failed to load the file TXTSETUP.SIF.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Open 'Version' section */
|
/* Open 'Version' section */
|
||||||
if (!SetupFindFirstLineW (SetupInf, L"Version", L"Signature", &Context))
|
if (!SetupFindFirstLineW (SetupInf, L"Version", L"Signature", &Context))
|
||||||
{
|
{
|
||||||
PopupError("Setup found a corrupt TXTSETUP.SIF.\n",
|
PopupError("Setup found a corrupt TXTSETUP.SIF.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Get pointer 'Signature' key */
|
/* Get pointer 'Signature' key */
|
||||||
if (!INF_GetData (&Context, NULL, &Value))
|
if (!INF_GetData (&Context, NULL, &Value))
|
||||||
{
|
{
|
||||||
PopupError("Setup found a corrupt TXTSETUP.SIF.\n",
|
PopupError("Setup found a corrupt TXTSETUP.SIF.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check 'Signature' string */
|
/* Check 'Signature' string */
|
||||||
if (_wcsicmp(Value, L"$ReactOS$") != 0)
|
if (_wcsicmp(Value, L"$ReactOS$") != 0)
|
||||||
{
|
{
|
||||||
PopupError("Setup found an invalid signature in TXTSETUP.SIF.\n",
|
PopupError("Setup found an invalid signature in TXTSETUP.SIF.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CheckUnattendedSetup();
|
CheckUnattendedSetup();
|
||||||
|
|
||||||
|
@ -977,19 +945,11 @@ DeviceSettingsPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
/* FIXME: report error */
|
/* FIXME: report error */
|
||||||
PopupError("Setup failed to load the keyboard layout list.\n",
|
PopupError("Setup failed to load the keyboard layout list.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while (TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CONSOLE_SetTextXY(6, 8, "The list below shows the current device settings.");
|
CONSOLE_SetTextXY(6, 8, "The list below shows the current device settings.");
|
||||||
|
|
||||||
|
@ -1372,7 +1332,8 @@ SelectPartitionPage(PINPUT_RECORD Ir)
|
||||||
"\n"
|
"\n"
|
||||||
" \x07 Press F3 to quit Setup."
|
" \x07 Press F3 to quit Setup."
|
||||||
" \x07 Press ENTER to continue.",
|
" \x07 Press ENTER to continue.",
|
||||||
"F3= Quit ENTER = Continue");
|
"F3= Quit ENTER = Continue",
|
||||||
|
NULL, POPUP_WAIT_NONE);
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
CONSOLE_ConInKey (Ir);
|
CONSOLE_ConInKey (Ir);
|
||||||
|
@ -1454,8 +1415,8 @@ SelectPartitionPage(PINPUT_RECORD Ir)
|
||||||
"of an already existing Partition!\n"
|
"of an already existing Partition!\n"
|
||||||
"\n"
|
"\n"
|
||||||
" * Press any key to continue.",
|
" * Press any key to continue.",
|
||||||
NULL);
|
NULL,
|
||||||
CONSOLE_ConInKey (Ir);
|
Ir, POPUP_WAIT_ANY_KEY);
|
||||||
|
|
||||||
return SELECT_PARTITION_PAGE;
|
return SELECT_PARTITION_PAGE;
|
||||||
}
|
}
|
||||||
|
@ -1469,8 +1430,8 @@ SelectPartitionPage(PINPUT_RECORD Ir)
|
||||||
PopupError ("You can not delete unpartitioned disk space!\n"
|
PopupError ("You can not delete unpartitioned disk space!\n"
|
||||||
"\n"
|
"\n"
|
||||||
" * Press any key to continue.",
|
" * Press any key to continue.",
|
||||||
NULL);
|
NULL,
|
||||||
CONSOLE_ConInKey (Ir);
|
Ir, POPUP_WAIT_ANY_KEY);
|
||||||
|
|
||||||
return SELECT_PARTITION_PAGE;
|
return SELECT_PARTITION_PAGE;
|
||||||
}
|
}
|
||||||
|
@ -2363,18 +2324,10 @@ FormatPartitionPage (PINPUT_RECORD Ir)
|
||||||
DPRINT ("WritePartitionsToDisk() failed\n");
|
DPRINT ("WritePartitionsToDisk() failed\n");
|
||||||
|
|
||||||
PopupError ("Setup failed to write partition tables.\n",
|
PopupError ("Setup failed to write partition tables.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while (TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey (Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set DestinationRootPath */
|
/* Set DestinationRootPath */
|
||||||
RtlFreeUnicodeString (&DestinationRootPath);
|
RtlFreeUnicodeString (&DestinationRootPath);
|
||||||
|
@ -2600,18 +2553,10 @@ InstallDirectoryPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
PopupError("Setup failed to find the 'SetupData' section\n"
|
PopupError("Setup failed to find the 'SetupData' section\n"
|
||||||
"in TXTSETUP.SIF.\n",
|
"in TXTSETUP.SIF.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while (TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey (Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Read the 'DefaultPath' data */
|
/* Read the 'DefaultPath' data */
|
||||||
if (INF_GetData (&Context, NULL, &DefaultPath))
|
if (INF_GetData (&Context, NULL, &DefaultPath))
|
||||||
|
@ -2698,18 +2643,9 @@ AddSectionToCopyQueue(HINF InfFile,
|
||||||
{
|
{
|
||||||
char Buffer[128];
|
char Buffer[128];
|
||||||
sprintf(Buffer, "Setup failed to find the '%S' section\nin TXTSETUP.SIF.\n", SectionName);
|
sprintf(Buffer, "Setup failed to find the '%S' section\nin TXTSETUP.SIF.\n", SectionName);
|
||||||
PopupError(Buffer, "ENTER = Reboot computer");
|
PopupError(Buffer, "ENTER = Reboot computer", Ir, POPUP_WAIT_ENTER);
|
||||||
|
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enumerate the files in the section
|
* Enumerate the files in the section
|
||||||
|
@ -2814,18 +2750,10 @@ PrepareCopyPageInfFile(HINF InfFile,
|
||||||
{
|
{
|
||||||
DPRINT("Creating directory '%S' failed: Status = 0x%08lx", PathBuffer, Status);
|
DPRINT("Creating directory '%S' failed: Status = 0x%08lx", PathBuffer, Status);
|
||||||
PopupError("Setup could not create the install directory.",
|
PopupError("Setup could not create the install directory.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Search for the 'Directories' section */
|
/* Search for the 'Directories' section */
|
||||||
|
@ -2834,24 +2762,17 @@ PrepareCopyPageInfFile(HINF InfFile,
|
||||||
if (SourceCabinet)
|
if (SourceCabinet)
|
||||||
{
|
{
|
||||||
PopupError("Setup failed to find the 'Directories' section\n"
|
PopupError("Setup failed to find the 'Directories' section\n"
|
||||||
"in the cabinet.\n", "ENTER = Reboot computer");
|
"in the cabinet.\n", "ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PopupError("Setup failed to find the 'Directories' section\n"
|
PopupError("Setup failed to find the 'Directories' section\n"
|
||||||
"in TXTSETUP.SIF.\n", "ENTER = Reboot computer");
|
"in TXTSETUP.SIF.\n", "ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Enumerate the directory values and create the subdirectories */
|
/* Enumerate the directory values and create the subdirectories */
|
||||||
do
|
do
|
||||||
|
@ -2885,20 +2806,12 @@ PrepareCopyPageInfFile(HINF InfFile,
|
||||||
{
|
{
|
||||||
DPRINT("Creating directory '%S' failed: Status = 0x%08lx", PathBuffer, Status);
|
DPRINT("Creating directory '%S' failed: Status = 0x%08lx", PathBuffer, Status);
|
||||||
PopupError("Setup could not create install directories.",
|
PopupError("Setup could not create install directories.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while (TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
while (SetupFindNextLine (&DirContext, &DirContext));
|
while (SetupFindNextLine (&DirContext, &DirContext));
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
@ -2925,18 +2838,10 @@ PrepareCopyPage(PINPUT_RECORD Ir)
|
||||||
if (SetupFileQueue == NULL)
|
if (SetupFileQueue == NULL)
|
||||||
{
|
{
|
||||||
PopupError("Setup failed to open the copy file queue.\n",
|
PopupError("Setup failed to open the copy file queue.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return(QUIT_PAGE);
|
return(QUIT_PAGE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!PrepareCopyPageInfFile(SetupInf, NULL, Ir))
|
if (!PrepareCopyPageInfFile(SetupInf, NULL, Ir))
|
||||||
{
|
{
|
||||||
|
@ -2974,36 +2879,20 @@ PrepareCopyPage(PINPUT_RECORD Ir)
|
||||||
if (InfFileData == NULL)
|
if (InfFileData == NULL)
|
||||||
{
|
{
|
||||||
PopupError("Cabinet has no setup script.\n",
|
PopupError("Cabinet has no setup script.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("Cannot open cabinet: %S.\n", CabinetGetCabinetName());
|
DPRINT("Cannot open cabinet: %S.\n", CabinetGetCabinetName());
|
||||||
|
|
||||||
PopupError("Cabinet not found.\n",
|
PopupError("Cabinet not found.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
InfHandle = INF_OpenBufferedFileA(InfFileData,
|
InfHandle = INF_OpenBufferedFileA(InfFileData,
|
||||||
InfFileSize,
|
InfFileSize,
|
||||||
|
@ -3013,18 +2902,10 @@ PrepareCopyPage(PINPUT_RECORD Ir)
|
||||||
if (InfHandle == INVALID_HANDLE_VALUE)
|
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
PopupError("Cabinet has no valid inf file.\n",
|
PopupError("Cabinet has no valid inf file.\n",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CabinetCleanup();
|
CabinetCleanup();
|
||||||
|
|
||||||
|
@ -3126,18 +3007,10 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
DPRINT("SetInstallPathValue() failed\n");
|
DPRINT("SetInstallPathValue() failed\n");
|
||||||
PopupError("Setup failed to set the initialize the registry.",
|
PopupError("Setup failed to set the initialize the registry.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Create the default hives */
|
/* Create the default hives */
|
||||||
Status = NtInitializeRegistry(TRUE);
|
Status = NtInitializeRegistry(TRUE);
|
||||||
|
@ -3145,18 +3018,10 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
DPRINT("NtInitializeRegistry() failed (Status %lx)\n", Status);
|
DPRINT("NtInitializeRegistry() failed (Status %lx)\n", Status);
|
||||||
PopupError("Setup failed to create the registry hives.",
|
PopupError("Setup failed to create the registry hives.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Update registry */
|
/* Update registry */
|
||||||
CONSOLE_SetStatusText(" Updating registry hives...");
|
CONSOLE_SetStatusText(" Updating registry hives...");
|
||||||
|
@ -3165,18 +3030,10 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
DPRINT1("SetupFindFirstLine() failed\n");
|
DPRINT1("SetupFindFirstLine() failed\n");
|
||||||
PopupError("Setup failed to find the registry data files.",
|
PopupError("Setup failed to find the registry data files.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -3206,19 +3063,11 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||||
DPRINT("Importing %S failed\n", File);
|
DPRINT("Importing %S failed\n", File);
|
||||||
|
|
||||||
PopupError("Setup failed to import a hive file.",
|
PopupError("Setup failed to import a hive file.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
while (SetupFindNextLine (&InfContext, &InfContext));
|
while (SetupFindNextLine (&InfContext, &InfContext));
|
||||||
|
|
||||||
/* Update display registry settings */
|
/* Update display registry settings */
|
||||||
|
@ -3226,36 +3075,20 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||||
if (!ProcessDisplayRegistry(SetupInf, DisplayList))
|
if (!ProcessDisplayRegistry(SetupInf, DisplayList))
|
||||||
{
|
{
|
||||||
PopupError("Setup failed to update display registry settings.",
|
PopupError("Setup failed to update display registry settings.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Update keyboard layout settings */
|
/* Update keyboard layout settings */
|
||||||
CONSOLE_SetStatusText(" Updating keyboard layout settings...");
|
CONSOLE_SetStatusText(" Updating keyboard layout settings...");
|
||||||
if (!ProcessKeyboardLayoutRegistry(LayoutList))
|
if (!ProcessKeyboardLayoutRegistry(LayoutList))
|
||||||
{
|
{
|
||||||
PopupError("Setup failed to update keyboard layout settings.",
|
PopupError("Setup failed to update keyboard layout settings.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Update the mounted devices list */
|
/* Update the mounted devices list */
|
||||||
SetMountedDeviceValues(PartitionList);
|
SetMountedDeviceValues(PartitionList);
|
||||||
|
@ -3438,15 +3271,8 @@ BootLoaderFloppyPage(PINPUT_RECORD Ir)
|
||||||
if (DoesFileExist(L"\\Device\\Floppy0", L"\\") == FALSE)
|
if (DoesFileExist(L"\\Device\\Floppy0", L"\\") == FALSE)
|
||||||
{
|
{
|
||||||
PopupError("No disk in drive A:.",
|
PopupError("No disk in drive A:.",
|
||||||
"ENTER = Continue");
|
"ENTER = Continue",
|
||||||
while(TRUE)
|
Ir, POPUP_WAIT_ENTER);
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return BOOT_LOADER_FLOPPY_PAGE;
|
return BOOT_LOADER_FLOPPY_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3487,36 +3313,20 @@ BootLoaderHarddiskPage(PINPUT_RECORD Ir)
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
PopupError("Setup failed to install the FAT bootcode on the system partition.",
|
PopupError("Setup failed to install the FAT bootcode on the system partition.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS_PAGE;
|
return SUCCESS_PAGE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PopupError("failed to install FAT bootcode on the system partition.",
|
PopupError("failed to install FAT bootcode on the system partition.",
|
||||||
"ENTER = Reboot computer");
|
"ENTER = Reboot computer",
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
while(TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
|
||||||
{
|
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return BOOT_LOADER_HARDDISK_PAGE;
|
return BOOT_LOADER_HARDDISK_PAGE;
|
||||||
}
|
}
|
||||||
|
@ -3669,22 +3479,24 @@ SignalInitEvent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID NTAPI
|
static VOID
|
||||||
NtProcessStartup(PPEB Peb)
|
RunUSetup(VOID)
|
||||||
{
|
{
|
||||||
INPUT_RECORD Ir;
|
INPUT_RECORD Ir;
|
||||||
PAGE_NUMBER Page;
|
PAGE_NUMBER Page;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
RtlNormalizeProcessParams(Peb->ProcessParameters);
|
|
||||||
|
|
||||||
ProcessHeap = Peb->ProcessHeap;
|
|
||||||
INF_SetHeap(ProcessHeap);
|
|
||||||
|
|
||||||
SignalInitEvent();
|
SignalInitEvent();
|
||||||
|
|
||||||
ret = AllocConsole(0);
|
ret = AllocConsole();
|
||||||
if (!ret)
|
if (ret)
|
||||||
|
ret = AttachConsole(ATTACH_PARENT_PROCESS);
|
||||||
|
|
||||||
|
if (!ret
|
||||||
|
#ifdef WIN32_USETUP
|
||||||
|
&& GetLastError() != ERROR_ACCESS_DENIED
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
PrintString("Unable to open the console\n\n");
|
PrintString("Unable to open the console\n\n");
|
||||||
PrintString("The most common cause of this is using an USB keyboard\n");
|
PrintString("The most common cause of this is using an USB keyboard\n");
|
||||||
|
@ -3694,6 +3506,16 @@ NtProcessStartup(PPEB Peb)
|
||||||
NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED,
|
NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED,
|
||||||
0,0,0,0,0);
|
0,0,0,0,0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||||
|
|
||||||
|
StdInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||||
|
StdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
|
GetConsoleScreenBufferInfo(StdOutput, &csbi);
|
||||||
|
xScreen = csbi.dwSize.X;
|
||||||
|
yScreen = csbi.dwSize.Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Initialize global unicode strings */
|
/* Initialize global unicode strings */
|
||||||
|
@ -3850,4 +3672,27 @@ NtProcessStartup(PPEB Peb)
|
||||||
NtTerminateProcess(NtCurrentProcess(), 0);
|
NtTerminateProcess(NtCurrentProcess(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef WIN32_USETUP
|
||||||
|
int
|
||||||
|
main(void)
|
||||||
|
{
|
||||||
|
ProcessHeap = GetProcessHeap();
|
||||||
|
RunUSetup();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
VOID NTAPI
|
||||||
|
NtProcessStartup(PPEB Peb)
|
||||||
|
{
|
||||||
|
RtlNormalizeProcessParams(Peb->ProcessParameters);
|
||||||
|
|
||||||
|
ProcessHeap = Peb->ProcessHeap;
|
||||||
|
INF_SetHeap(ProcessHeap);
|
||||||
|
RunUSetup();
|
||||||
|
}
|
||||||
|
#endif /* !WIN32_USETUP */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue