CORE-9023
Make also the advanced boot menu depend on the operating system type.
It can be opened by pressing F8, or F5, as in the Windows' bootloader.
The FreeLoader-specific options are moved to a separate menu,
accessible via the F2 key from the main menu.
Work-in-progress: display the boot options that correspond to the
currently-selected boot entry.
Use `NtLdrGetNextOption()` to loop over each individual option and move
it to its proper place. This automatically trims any '/' option
separator, including repeated ones and whitespaces, and allow for
straightforward replacement with one single space.
instead of returning an erroneous value, since the rosload.exe entry point
`RunLoader()` doesn't return any value. This allows exiting from rosload.exe
and NOT having the `LaunchSecondStageLoader()` returning 0, for example,
which would then be interpreted as an error condition and showing the
"Unable to load second stage loader." error box.
- Load an old configuration and a current configuration.
- Free the configurations properly.
- Call the ApplyPnPChanges method after the ApplyRegistryChanges method.
- Move changes to the TCPIP and DHCP services from the ApplyRegistryChanges method to the ApplyPnpChanges method.
- `AtaInit()` returns the number of detected ATA devices. Therefore,
when iterating over them, go from index 0 to the count _minus_ 1,
in `Pc98InitializeBootDevices()` and in `XboxDiskInit()`.
- Initialize `DiskDrive->Type` to `DRIVE_TYPE_HDD` for detected SCSI
hard-disk drives in `pc98disk.c!InitScsiDrive()`.
- Rearrange `XboxDiskInit()` and reduce its indentation level.
Move the `DiskReportError()` and `DiskError()` routines into the
`freeldr/disk/disk.c` file, reviving it as a collection of disk
devices helpers (and more in the future).
The architecture-specific disk modules only define the error code mapping
`DiskGetErrorCodeString()` function, that is then used by `DiskError()`.
- Let it take a `MachFindPciBios` parameter, similar to the
`GET_SERIAL_PORT MachGetSerialPort` parameter of `DetectSerialPorts()`.
- Remove the `FindPciBios` global.
- Reduce indentation level.
Skip x86 BIOS emulator initialization on EFI boots by having FreeLdr populate EFI boot state in the loader block and making HAL consume it.
This keeps BIOS behavior unchanged while avoiding legacy BIOS/INT10 setup in the EFI path and preventing early EFI boot failures caused by entering the BIOS emulator path at all.
The funstion should create/open "Device Parameters" subkey of a device reference key (and return a handle to it), instead of device instance subkey.
- Fix SetupDiCreateDeviceInterfaceRegKeyW() to open (and return a handle to) the correct registry key.
- Fix its usage in internal InstallOneInterface() helper, which is called by SetupDiInstallDeviceInterfaces().
This fixes audio devices enumeration failure of winmm.dll from Windows 2000 SP4 (and unneeded creation of wrong registry keys) when using ReactOS with audio stack replacement from Windows XP/2003.
CORE-19986
* [FREELDR][UEFI] Add BGRT logo support and center it on the loading screen
* [FREELDR][UEFI] Rework BGRT support and localize ACPI definitions
* [FREELDR][UEFI] Handle signed BGRT BMP height explicitly
* [FREELDR][UEFI] Use shared ACPI BGRT definitions
---------
Co-authored-by: Ahmed ARIF <arif.ing@outlook.com>
Remove *_new prefix from the new HDAudBus driver, since it's now used by default and the previous (old) one was removed.
[DOC] Update the path of the new HDAudBus driver to the current actual one.
We will continue with this stuff when we can understand the root issues better
* Revert "[NTDLL_APITEST] Relicense implicit tls tests as MIT"
This reverts commit ec6bae2b31.
* Revert "[NTDLL:LDR] Add Implicit Thread Local Storage Support (#7594)"
This reverts commit 23043ce0b8.
#8641 introduced some bugs. We revert it.
JIRA issue: CORE-20538
- Delete FONT_LOOKUP_CACHE and
s_FontLookupCacheList.
- Delete FontLookUp_... functions.
- Revert FontLink_PrepareFontInfo and
TextIntRealizeFont functions.
Fix https://reactos.org/testman/detail.php?id=87298653&prev=87291347
PropVariantChangeType is exported in propsys, and before the ole32 sync PropVariantChangeType was commented out. This causes the linker to link against the stub in ole32 rather than the function in propsys.
- Load and store alternate configurations properly.
- Use unique resource ids for the alternate configuration dialog.
- Fix code to enable or disable the name server address controls.
- Build the registry path to the network interface only once.
TODO: Fix the format of the alternate configuration data.
Before Windows Vista, TLS directories were ignored by Ldr* in any module loaded after process creation, which meant that the TLS index in any delay-loaded module remained 0. This means that when running an application targeting Vista and above and its delay-load modules have TLS directories, the following events can happen:
One or more delay-load modules claim ThreadLocalStoragePointer idx 0, resulting in data corruption and possible buffer overflows as data intended for one of the immediate-load modules is overwritten.
None of the immediate-load modules has a TLS directory, so ThreadLocalStoragePointer is not initialized. This means that the program crashes when one of the delay-load modules attempts to access its TLS data.
Adding implicit TLS support improves support for NT 6.x/10 user-mode applications, including all contemporary major web browsers.
JIRA issue: CORE-19413
---------
Co-authored-by: Justin Miller <justin.miller@reactos.org>
wlanconf\wlanconf.c(592):
warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
wlanconf\wlanconf.c(602),(683):
warning C4267: '=': conversion from 'size_t' to 'ULONG', possible loss of data
netsh\helper.c(84):
warningC4267: 'function': conversion from 'size_t' to 'DWORD', possible loss of data
netsh\netsh.c(65):
warning C4267: '+=': conversion from 'size_t' to 'INT', possible loss of data
net\cmdLocalGroup.c(125):
warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
net\cmdShare.c(115),(128),(142):
warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
net\cmdUse.c(89),(178),(194):
warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
net\cmdUser.c(597),(631),(676):
warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
ipconfig\ipconfig.c(236):
warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
ipconfig\ipconfig.c(263),(306),(380):
warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
ipconfig\ipconfig.c(303):
warning C4267: 'initializing': conversion from 'size_t' to 'DWORD', possible loss of data
ipconfig\ipconfig.c(1318): warning C4267: 'function': conversion from 'size_t' to 'DWORD', possible loss of data
dwnl\dwnl.c(387):
warning C4267: 'function': conversion from 'size_t' to 'DWORD', possible loss of data
dwnl\dwnl.c(401):
warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
whoami\whoami.c(134):
warning C4267: 'initializing': conversion from 'size_t' to 'DWORD', possible loss of data
whoami\whoami.c(241),(256):
warning C4267: 'initializing': conversion from 'size_t' to 'UINT', possible loss of data
CORE-20537
- `WhoamiSetTable()`: Specify the correct size for allocating a buffer
for a NUL-terminated UTF16 string (previously, only half the space for
the NUL terminator was considered).
This caused a heap corruption when the corresponding NUL-terminate
string was then copied into this buffer, and potentially leading to
reading past the end of the string (since no real NUL terminator
would be found).
- `WhoamiPrintTable()`: Just make it do what it needs to do: print the
table and nothing more: no "side-effect" behaviour like table freeing.
- Instead, add a `WhoamiFreeTable()` routine whose purpose is just to
free the table. And the tables are freed in the routines where they
have been previously allocated.
- `WhoamiPrintTable()`:
* Allocate a column-lengths table *ONLY* when needed, i.e. when
printing the table in "table" format. When printing it in "list"
format, there is no need to allocate anything and we can instead
use only a single variable.
* The old code handling "those pesky ':'" -- used when tables are
displayed in list format, using: `whoami /all /fo list` -- was buggy,
because it was patching the table header names, writing a ':' and a
NUL-terminator past the end of the allocated string buffer (see bug
described above in `WhoamiSetTable()`). As a result, once the table
was freed, a heap corruption would happen, leading to a crash.
Now, displaying the ':' is handled as part of the wprintf()-formatting
table item string.
* For developers, two ways of displaying these ':' are proposed:
the way Windows displays the table in "list" format, where the ':'
directly follow the item names in the 1st column; and a "nicer" one
(to my taste!), where all the ':' are vertically aligned -- currently
disabled.