2017-05-25 23:52:50 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Setup Library
|
|
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
2017-06-08 17:30:23 +00:00
|
|
|
* PURPOSE: Boot Stores Management functionality, with support for
|
|
|
|
* NT 5.x family (MS Windows <= 2003, and ReactOS) bootloaders.
|
2017-05-25 23:52:50 +00:00
|
|
|
* COPYRIGHT: Copyright 2017-2018 Hermes Belusca-Maito
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TODO: Add support for NT 6.x family! (detection + BCD manipulation).
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-06-08 17:30:23 +00:00
|
|
|
typedef enum _BOOT_STORE_TYPE
|
2017-05-25 23:52:50 +00:00
|
|
|
{
|
|
|
|
FreeLdr, // ReactOS' FreeLoader
|
|
|
|
NtLdr, // Windows <= 2k3 NT "FlexBoot" OS Loader NTLDR
|
|
|
|
// BootMgr, // Vista+ BCD-oriented BOOTMGR
|
|
|
|
BldrTypeMax
|
2017-06-08 17:30:23 +00:00
|
|
|
} BOOT_STORE_TYPE;
|
2017-05-25 23:52:50 +00:00
|
|
|
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
/*
|
|
|
|
* Some references about EFI boot entries:
|
|
|
|
* https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/overview-of-boot-options-in-efi
|
|
|
|
* https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/identifying-backup-files-for-existing-boot-entries
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This structure is inspired from the EFI boot entry structure
|
|
|
|
* BOOT_OPTIONS that is defined in ndk/iotypes.h .
|
|
|
|
*/
|
2017-06-08 17:30:23 +00:00
|
|
|
typedef struct _BOOT_STORE_OPTIONS
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
{
|
2017-06-08 17:30:23 +00:00
|
|
|
ULONG Version; // BOOT_STORE_TYPE value
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
// ULONG Length;
|
|
|
|
ULONG Timeout;
|
|
|
|
ULONG_PTR CurrentBootEntryKey;
|
|
|
|
// ULONG_PTR NextBootEntryKey;
|
|
|
|
// WCHAR HeadlessRedirection[1];
|
2017-06-08 17:30:23 +00:00
|
|
|
} BOOT_STORE_OPTIONS, *PBOOT_STORE_OPTIONS;
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* These macros are used to set a value for the BootEntryKey member of a
|
2017-06-08 17:30:23 +00:00
|
|
|
* BOOT_STORE_ENTRY structure, much in the same idea as MAKEINTRESOURCE and
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
* IS_INTRESOURCE macros for Win32 resources.
|
|
|
|
*
|
2017-06-08 17:30:23 +00:00
|
|
|
* A key consists of either a boot ID number, comprised between 0 and
|
|
|
|
* MAX_USHORT == 0xFFFF == 65535, or can be a pointer to a human-readable
|
|
|
|
* string (section name), as in the case of FreeLDR, or to a GUID, as in the
|
|
|
|
* case of BOOTMGR.
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
*
|
|
|
|
* If IS_INTKEY(BootEntryKey) == TRUE, i.e. the key is <= 65535, this means
|
|
|
|
* the key is a boot ID number, otherwise it is typically a pointer to a string.
|
|
|
|
*/
|
|
|
|
#define MAKESTRKEY(i) ((ULONG_PTR)(i))
|
|
|
|
#define MAKEINTKEY(i) ((ULONG_PTR)((USHORT)(i)))
|
|
|
|
#define IS_INTKEY(i) (((ULONG_PTR)(i) >> 16) == 0)
|
|
|
|
|
2017-05-25 23:52:50 +00:00
|
|
|
/*
|
|
|
|
* This structure is inspired from the EFI boot entry structures
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
* BOOT_ENTRY and FILE_PATH that are defined in ndk/iotypes.h .
|
2017-05-25 23:52:50 +00:00
|
|
|
*/
|
2017-06-08 17:30:23 +00:00
|
|
|
typedef struct _BOOT_STORE_ENTRY
|
2017-05-25 23:52:50 +00:00
|
|
|
{
|
2017-06-08 17:30:23 +00:00
|
|
|
ULONG Version; // BOOT_STORE_TYPE value
|
2017-05-25 23:52:50 +00:00
|
|
|
// ULONG Length;
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
ULONG_PTR BootEntryKey; // Boot entry "key"
|
|
|
|
PCWSTR FriendlyName; // Human-readable boot entry description // LoadIdentifier
|
|
|
|
PCWSTR BootFilePath; // Path to e.g. osloader.exe, or winload.efi // EfiOsLoaderFilePath
|
|
|
|
ULONG OsOptionsLength; // Loader-specific options blob (can be a string, or a binary structure...)
|
|
|
|
UCHAR OsOptions[ANYSIZE_ARRAY];
|
|
|
|
/*
|
|
|
|
* In packed form, this structure would contain offsets to 'FriendlyName'
|
|
|
|
* and 'BootFilePath' strings and, after the OsOptions blob, there would
|
|
|
|
* be the following data:
|
|
|
|
*
|
|
|
|
* WCHAR FriendlyName[ANYSIZE_ARRAY];
|
|
|
|
* FILE_PATH BootFilePath;
|
|
|
|
*/
|
2017-06-08 17:30:23 +00:00
|
|
|
} BOOT_STORE_ENTRY, *PBOOT_STORE_ENTRY;
|
2017-05-25 23:52:50 +00:00
|
|
|
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
/* "NTOS" (aka. ReactOS or MS Windows NT) <= 5.x options */
|
|
|
|
typedef struct _NTOS_OPTIONS
|
|
|
|
{
|
|
|
|
UCHAR Signature[8]; // "NTOS_5\0\0"
|
|
|
|
// ULONG Version;
|
|
|
|
// ULONG Length;
|
2017-06-08 17:30:23 +00:00
|
|
|
PCWSTR OsLoadPath; // The OS SystemRoot path // OsLoaderFilePath // OsFilePath
|
|
|
|
PCWSTR OsLoadOptions; // OsLoadOptions
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
/*
|
|
|
|
* In packed form, this structure would contain an offset to the 'OsLoadPath'
|
|
|
|
* string, and the 'OsLoadOptions' member would be:
|
|
|
|
* WCHAR OsLoadOptions[ANYSIZE_ARRAY];
|
|
|
|
* followed by:
|
|
|
|
* FILE_PATH OsLoadPath;
|
|
|
|
*/
|
|
|
|
} NTOS_OPTIONS, *PNTOS_OPTIONS;
|
|
|
|
|
|
|
|
#define NTOS_OPTIONS_SIGNATURE "NTOS_5\0\0"
|
|
|
|
|
|
|
|
/* Options for boot-sector boot entries */
|
|
|
|
typedef struct _BOOT_SECTOR_OPTIONS
|
|
|
|
{
|
|
|
|
UCHAR Signature[8]; // "BootSect"
|
|
|
|
// ULONG Version;
|
|
|
|
// ULONG Length;
|
|
|
|
PCWSTR Drive;
|
|
|
|
PCWSTR Partition;
|
|
|
|
PCWSTR BootSectorFileName;
|
|
|
|
} BOOT_SECTOR_OPTIONS, *PBOOT_SECTOR_OPTIONS;
|
|
|
|
|
|
|
|
#define BOOT_SECTOR_OPTIONS_SIGNATURE "BootSect"
|
|
|
|
|
2017-05-25 23:52:50 +00:00
|
|
|
|
|
|
|
typedef NTSTATUS
|
|
|
|
(NTAPI *PENUM_BOOT_ENTRIES_ROUTINE)(
|
2017-06-08 17:30:23 +00:00
|
|
|
IN BOOT_STORE_TYPE Type,
|
|
|
|
IN PBOOT_STORE_ENTRY BootEntry,
|
2017-05-25 23:52:50 +00:00
|
|
|
IN PVOID Parameter OPTIONAL);
|
|
|
|
|
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
FindBootStore( // By handle
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN HANDLE PartitionDirectoryHandle, // OPTIONAL
|
2017-06-08 17:30:23 +00:00
|
|
|
IN BOOT_STORE_TYPE Type,
|
|
|
|
OUT PULONG VersionNumber OPTIONAL);
|
2017-05-25 23:52:50 +00:00
|
|
|
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
|
2017-05-25 23:52:50 +00:00
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
OpenBootStoreByHandle(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
OUT PVOID* Handle,
|
|
|
|
IN HANDLE PartitionDirectoryHandle, // OPTIONAL
|
2017-06-08 17:30:23 +00:00
|
|
|
IN BOOT_STORE_TYPE Type,
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN BOOLEAN CreateNew);
|
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
OpenBootStore_UStr(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
OUT PVOID* Handle,
|
|
|
|
IN PUNICODE_STRING SystemPartitionPath,
|
2017-06-08 17:30:23 +00:00
|
|
|
IN BOOT_STORE_TYPE Type,
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN BOOLEAN CreateNew);
|
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
OpenBootStore(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
OUT PVOID* Handle,
|
|
|
|
IN PCWSTR SystemPartition,
|
2017-06-08 17:30:23 +00:00
|
|
|
IN BOOT_STORE_TYPE Type,
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN BOOLEAN CreateNew);
|
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
CloseBootStore(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN PVOID Handle);
|
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
AddBootStoreEntry(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN PVOID Handle,
|
2017-06-08 17:30:23 +00:00
|
|
|
IN PBOOT_STORE_ENTRY BootEntry,
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN ULONG_PTR BootEntryKey);
|
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
DeleteBootStoreEntry(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN PVOID Handle,
|
|
|
|
IN ULONG_PTR BootEntryKey);
|
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
ModifyBootStoreEntry(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN PVOID Handle,
|
2017-06-08 17:30:23 +00:00
|
|
|
IN PBOOT_STORE_ENTRY BootEntry);
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
QueryBootStoreEntry(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN PVOID Handle,
|
|
|
|
IN ULONG_PTR BootEntryKey,
|
2017-06-08 17:30:23 +00:00
|
|
|
OUT PBOOT_STORE_ENTRY BootEntry); // Technically this should be PBOOT_STORE_ENTRY*
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
QueryBootStoreOptions(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN PVOID Handle,
|
2017-06-08 17:30:23 +00:00
|
|
|
IN OUT PBOOT_STORE_OPTIONS BootOptions
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
/* , IN PULONG BootOptionsLength */ );
|
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
SetBootStoreOptions(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN PVOID Handle,
|
2017-06-08 17:30:23 +00:00
|
|
|
IN PBOOT_STORE_OPTIONS BootOptions,
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN ULONG FieldsToChange);
|
|
|
|
|
|
|
|
NTSTATUS
|
2017-06-08 17:30:23 +00:00
|
|
|
EnumerateBootStoreEntries(
|
[SETUPLIB] Introduce a lot of (Work in progress) functions to manipulate boot entries from different boot "stores".
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
2017-06-07 15:58:44 +00:00
|
|
|
IN PVOID Handle,
|
|
|
|
// IN ULONG Flags, // Determine which data to retrieve
|
2017-05-25 23:52:50 +00:00
|
|
|
IN PENUM_BOOT_ENTRIES_ROUTINE EnumBootEntriesRoutine,
|
|
|
|
IN PVOID Parameter OPTIONAL);
|
|
|
|
|
|
|
|
/* EOF */
|