Commit Graph

88577 Commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
9ff4e4b9ef [FREELDR][NTLDR] Move the ReactOS/NT-specific advanced boot menu to its separate file
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.
2026-04-04 22:15:58 +02:00
Hermès Bélusca-Maïto
1ac657ed0e [FREELDR:NTLDR] Normalize the boot options as soon as possible, and fix the algorithm
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.
2026-04-04 21:46:29 +02:00
Hermès Bélusca-Maïto
e87a74f131 [FREELDR] LaunchSecondStageLoader(): Always return ESUCCESS if rosload.exe started correctly...
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.
2026-04-04 21:46:28 +02:00
Eric Kohl
55f9484b95 [SYSSETUP] Move the security install step into the item completion thread 2026-04-04 10:36:31 +02:00
Doug Lyons
22ce5b1bc8 [CHKDSK][VFATLIB] Make ReactOS chkdsk output match MS for last 3 lines (#8839)
Added line for "bytes per cluster".
Improved formatting of output to align text for last 4 lines.
2026-04-03 12:32:14 -05:00
Eric Kohl
a34fd324ef [NETCFGX] Keep two configurations in the TCPIP notification object
- 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.
2026-04-03 18:24:27 +02:00
Eric Kohl
bbdbe763d9 [INCUDE] Fix a typo in the INetCfgComponentControl_ApplyPnpChanges macro 2026-04-03 15:48:29 +02:00
Hermès Bélusca-Maïto
56481e1b8d [FREELDR:ARCH] Modularize the disk registration code (#8736) 2026-04-02 17:36:10 +02:00
Hermès Bélusca-Maïto
d2cbec0b5f [FREELDR:ARCH] Fix minor bugs; condense XboxDiskInit() a bit (#8732)
- `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.
2026-04-02 17:23:39 +02:00
Hermès Bélusca-Maïto
62d71ebbd3 [FREELDR:ARCH] hwide.c: Don't rely on DEVICE_UNIT P; to be at the beginning of the HW_DEVICE_UNIT structure (#8732) 2026-04-02 17:20:20 +02:00
Hermès Bélusca-Maïto
9f42210478 [FREELDR:ARCH] Modularize the DiskError() functionality (#8732)
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()`.
2026-04-02 17:17:01 +02:00
Hermès Bélusca-Maïto
c25c527c25 [FREELDR:ARCH] Simplify DetectPciBios() (#8732)
- Let it take a `MachFindPciBios` parameter, similar to the
  `GET_SERIAL_PORT MachGetSerialPort` parameter of `DetectSerialPorts()`.

- Remove the `FindPciBios` global.
- Reduce indentation level.
2026-04-02 17:16:54 +02:00
Ahmed Arif
229f7891a1 [FREELDR][HAL] Skip x86 BIOS emulator on UEFI boots (#8827)
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.
2026-04-02 13:37:43 +02:00
Ahmed Arif
5b7a4c948c [FREELDR] Tune MiniTUI progress bar colors (#8828)
If NTLDR_PROGRESSBAR is not defined, use Vista+ style TUI for progress bars in Freeldr. Also, add some macros to improve readability.
2026-04-02 13:04:14 +02:00
Ahmed ARIF
7509b428bf [DBGHELP][AMD64] Return the last valid frame at end of stack in StackWalk64 2026-04-02 12:06:19 +02:00
Oleg Dubinskiy
b205c04173 [SETUPAPI] Fix wrong registry key opened by SetupDiCreateDeviceInterfaceRegKeyW()
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
2026-04-02 12:03:31 +02:00
Ahmed Arif
9a7f64a0c6 [FREELDR:UEFI] Add BGRT logo support and center it on the loading screen (#8820)
* [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>
2026-04-02 11:35:09 +02:00
Oleg Dubinskiy
410dd824aa [DRIVERS] Update the name of the new HD audio bus driver
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.
2026-04-02 11:33:07 +02:00
Oleg Dubinskiy
b308bcc311 [DRIVERS] Remove old HD audio bus driver
since it's obsolete now and is not used any more.
2026-04-02 11:33:07 +02:00
Mikhail Tyukin
dcd45a59d1 [LIBJPEG][LIBPNG][LIBTIFF] Update (#8808)
* [LIBTIFF] Update to 4.7.1

* [LIBPNG] Update to 1.6.51

* [LIBJPEG] Update to 10
2026-04-01 17:27:34 +02:00
Alex Mendoza
fd683dbba4 [SHELL32] AddCommasW: Use LOCALE_SGROUPING instead of harcoded grouping (#8814) 2026-04-01 14:27:17 +02:00
Justin Miller
e68ebe19c6 [NTDLL] Revert Implict ThreadLocalStorage for now (#8823)
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.
2026-04-01 13:56:00 +02:00
Katayama Hirofumi MZ
45a4f95b04 [NTGDI][FREETYPE] Revert 'font look-up cache #8641' (#8816)
#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.
2026-04-01 19:23:17 +09:00
Mikhail Tyukin
7950ea3f07 [OLE32] Remove PropVariantChangeType (#8822)
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.
2026-04-01 12:19:51 +02:00
Justin Miller
20494b84ef [PCIX] PciComputeNewCurrentSettings skip CmResourceSharedDeviceExclusive (#8464) 2026-04-01 09:29:34 +00:00
Eric Kohl
7139e57ff8 [NETCFGX] Fix the alternate network configuration
- 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.
2026-04-01 00:35:20 +02:00
Václav Zouzalík
e46a837fb7 [HOSTNAME] Update Czech (cs-CZ) and Slovak (sk-SK) translation (#8817) 2026-03-31 22:43:59 +02:00
Doug Lyons
c2f56643b6 [VFATLIB][FMIFS][CHKDSK] Chkdsk fixes and improvements (#8810)
CORE-18432

Co-authored-by: Carl J. Bialorucki <carl.bialorucki@reactos.org>
2026-03-31 13:13:31 -05:00
Carl J. Bialorucki
ec6bae2b31 [NTDLL_APITEST] Relicense implicit tls tests as MIT
Approval from original author given to Carl Bialorucki in writing.
2026-03-31 16:56:51 +02:00
Mikhail Tyukin
c93cbb9bf1 [BCRYPTPRIMITIVES] Import from wine-10.0 (#8818)
Import bcryptprimitives.dll from wine-10.0 for modern applications
2026-03-31 14:10:35 +00:00
Shane Fournier
23043ce0b8 [NTDLL:LDR] Add Implicit Thread Local Storage Support (#7594)
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>
2026-03-31 11:21:57 +00:00
Hermès Bélusca-Maïto
97cc32519f [WLANCONF] Improve imports and fix x64 build warnings
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
2026-03-30 21:46:10 +02:00
Hermès Bélusca-Maïto
3913b3cf35 [TRACERT] Improve imports, simplify code, and fix x64 build warning
tracert\tracert.cpp(209):
  warning C4267: 'argument': conversion from 'size_t' to 'socklen_t', possible loss of data
2026-03-30 21:46:09 +02:00
Hermès Bélusca-Maïto
012e9be792 [NETSH] Improve imports, simplify code, and fix x64 build warnings
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
2026-03-30 21:46:07 +02:00
Hermès Bélusca-Maïto
0038ad5423 [NET] Improve imports, simplify code, and fix x64 build warnings
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
2026-03-30 21:46:06 +02:00
Hermès Bélusca-Maïto
c2ecf0649d [IPCONFIG] Improve imports, LP* -> P*, and fix x64 build warnings
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
2026-03-30 21:46:05 +02:00
Hermès Bélusca-Maïto
12d0b84141 [DWNL] Improve imports, use _countof(), and fix x64 build warnings
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
2026-03-30 21:46:04 +02:00
Hermès Bélusca-Maïto
c336730f5d [WHOAMI] Improve imports, simplify code, and fix x64 build warnings
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
2026-03-30 21:45:49 +02:00
Hermès Bélusca-Maïto
544e8cc292 [WHOAMI] Fix heap corruption causing crashes when displaying user names/groups tables
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.
2026-03-30 21:12:56 +02:00
Hermès Bélusca-Maïto
ddca2afaea [TASKLIST] Improve imports, simplify code 2026-03-30 16:18:48 +02:00
Hermès Bélusca-Maïto
4750869ccb [REPLACE] Improve imports and code style 2026-03-30 16:18:45 +02:00
Hermès Bélusca-Maïto
1043e35139 [LABEL] Improve imports and fix x64 build warning
label\label.c(168):
  warning C4267: '+=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 16:18:45 +02:00
Hermès Bélusca-Maïto
85841c2ba2 [FIND] Improve imports and fix x64 build warnings
find\find.c(64),(65):
  warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 16:18:40 +02:00
Hermès Bélusca-Maïto
f19cb6af8b [EVENTCREATE] Improve imports, LP* -> P*, and fix x64 build warning
eventcreate\eventcreate.c(248):
  warning C4267: 'function': conversion from 'size_t' to 'DWORD', possible loss of data
2026-03-30 16:18:39 +02:00
Hermès Bélusca-Maïto
6079fab420 [COMP] Improve imports and fix x64 build warning
comp\comp.c(44):
  warning C4267: 'return': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 16:18:38 +02:00
Hermès Bélusca-Maïto
f00588552f [CERTUTIL] Improve imports and fix x64 build warning
certutil\asn.cpp(224):
  warning C4267: 'initializing': conversion from 'size_t' to 'DWORD', possible loss of data
2026-03-30 16:18:32 +02:00
Hermès Bélusca-Maïto
6affaf1975 [ATTRIB] Improve imports and fix x64 build warnings
attrib\attrib.c(220),(305):
  warning C4267: 'function': conversion from 'size_t' to '_off_t', possible loss of data
2026-03-30 16:18:23 +02:00
Hermès Bélusca-Maïto
7b3b63feef [AT] Improve imports, simplify code, and fix x64 build warnings
at\at.c(281),(482),(488),(509),(515),(610),(616),(637),(643):
  warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 16:10:27 +02:00
Hermès Bélusca-Maïto
d3a6aed771 [FORMAT] Improve imports, simplify code 2026-03-30 16:08:36 +02:00
Hermès Bélusca-Maïto
7a82bc8deb [CACLS] Improve imports, simplify code, and fix x64 build warning
cacls\cacls.c(198):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
2026-03-30 16:04:05 +02:00