Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 451 of file winldr.c.
Referenced by RunLoader().
{ BOOLEAN HasSection; char BootPath[MAX_PATH]; CHAR FileName[MAX_PATH]; CHAR BootOptions[256]; PCHAR File; BOOLEAN Status; ULONG_PTR SectionId; PLOADER_PARAMETER_BLOCK LoaderBlock; // Open the operating system section // specified in the .ini file HasSection = IniOpenSection(OperatingSystemName, &SectionId); UiDrawBackdrop(); UiDrawProgressBarCenter(1, 100, "Loading NT..."); /* Read the system path is set in the .ini file */ if (!HasSection || !IniReadSettingByName(SectionId, "SystemPath", BootPath, sizeof(BootPath))) { strcpy(BootPath, OperatingSystemName); } /* Special case for LiveCD */ if (!_strnicmp(BootPath, "LiveCD", strlen("LiveCD"))) { strcpy(FileName, BootPath + strlen("LiveCD")); MachDiskGetBootPath(BootPath, sizeof(BootPath)); strcat(BootPath, FileName); } /* append a backslash */ if ((strlen(BootPath)==0) || BootPath[strlen(BootPath)] != '\\') strcat(BootPath, "\\"); /* Read booting options */ if (!HasSection || !IniReadSettingByName(SectionId, "Options", BootOptions, sizeof(BootOptions))) { /* Get options after the title */ const CHAR*p = SettingsValue; while (*p == ' ' || *p == '"') p++; while (*p != '\0' && *p != '"') p++; strcpy(BootOptions, p); TRACE("BootOptions: '%s'\n", BootOptions); } /* Append boot-time options */ AppendBootTimeOptions(BootOptions); /* Check if a ramdisk file was given */ File = strstr(BootOptions, "/RDPATH="); if (File) { /* Copy the file name and everything else after it */ strcpy(FileName, File + 8); /* Null-terminate */ *strstr(FileName, " ") = ANSI_NULL; /* Load the ramdisk */ RamDiskLoadVirtualFile(FileName); } /* Let user know we started loading */ //UiDrawStatusText("Loading..."); TRACE("BootPath: '%s'\n", BootPath); /* Allocate and minimalistic-initialize LPB */ AllocateAndInitLPB(&LoaderBlock); #ifdef _M_IX86 /* Setup redirection support */ WinLdrSetupEms(BootOptions); #endif /* Load Hive */ UiDrawBackdrop(); UiDrawProgressBarCenter(15, 100, "Loading system hive..."); Status = WinLdrInitSystemHive(LoaderBlock, BootPath); TRACE("SYSTEM hive loaded with status %d\n", Status); /* Load NLS data, OEM font, and prepare boot drivers list */ Status = WinLdrScanSystemHive(LoaderBlock, BootPath); TRACE("SYSTEM hive scanned with status %d\n", Status); LoadAndBootWindowsCommon(OperatingSystemVersion, LoaderBlock, BootOptions, BootPath, 0); }