87795 Commits

Author SHA1 Message Date
Eric Kohl
127b363692 [KBDGRE1] Improve the German Extended 1 keyboard layout
- This layout is Work In Progress
- Add characters to the fist row including the acute and grave dead key characters
2025-10-05 16:00:50 +02:00
Eric Kohl
88ec843e02 [KBD] Add German Extended 1 keyboard layout 2025-10-05 11:39:26 +02:00
Hermès Bélusca-Maïto
3598ae9fbb [SDK] arc.h: Isolate the ARC-specific definitions from those specific to the NT OS Loader Parameter Block 2025-10-04 19:49:56 +02:00
Adam Słaboń
5187834463 [SDK] Update loader parameter block structure definitions to Windows 10 RTM (#8236)
Mostly based on the information on Geoff Chappell's website, Vergilius Project and WDK 10.0.10586.0
2025-10-04 07:11:00 -07:00
Eric Kohl
5a86857637 [INPUT] Add string resources for the German Extended keyboard layouts E1 and E2 2025-10-04 10:12:41 +02:00
Justin Miller
094b7d9c79 [FORMATTING] Start Kernel Arbiter with clean instance 2025-10-03 07:32:33 -07:00
Eric Kohl
b37aafeed6 [NETSH] Sort the help command list alphabetically 2025-09-30 21:37:39 +02:00
Mohammed al-Ramadany
2a0acdbadc [KMTESTS] Kmtest fixes (#8308)
- [KMTEST:IOFILESYSTEM] Add support for NTFS
- [KMTEST:IODEVICEOBJECT] Work around a Windows 7 bug, account for struct size changes on x64, accept Vista+ behavior
- [KMTEST:EXPOOLS] Accept pool being promoted to NonPaged on Vista+, accept 2GB allocation on x64, guard an undocumented behavior
- [KMTEST:CMSECURITY] Add tests for Vista-Win8.1
2025-09-30 10:57:23 -05:00
Justin Miller
b19eba558c [SDK] Sign all reactos drivers with the testbot (#8404)
This allows if the directory with the tools exists to trigger sign tool on all MSVC builds.
2025-09-30 02:18:08 +00:00
Hermès Bélusca-Maïto
a0c427319f [FREELDR] Improve DiskGetExtendedDriveParameters()
- Move BIOS-specific `EXTENDED_GEOMETRY` structure to pcdisk.c

- Zero out the transfer buffer for INT 13h, function 48h before
  invocation. This ensures that any random data is removed and
  that some broken BIOSes behave better.

- Use a more suitable type for the pointer to the transfer buffer,
  so that we can use more human-manageable member names in TRACEs
  instead of magic buffer offsets.
2025-09-29 20:48:19 +02:00
Hermès Bélusca-Maïto
1375320ac4 [FREELDR] pc98disk.c: Simplify disk read checks in loops 2025-09-29 20:27:04 +02:00
Hermès Bélusca-Maïto
10b7a85991 [FREELDR] Fix the DPTE validity check, addendum to commit 4190b48924
Which is also an addendum to commit b3f11cfb38 (r17484).

The Enhanced Disk Drive Specification tells us that if the (far) pointer
to the Device Parameter Table Extension is set to FFFF:FFFF, the pointer
is invalid.

However there are some BIOSes, incl UEFI ones when running in Legacy
mode (e.g. GIGABYTE UEFI DualBIOS), that set this pointer to 0000:0000
instead, which is also an invalid value.
2025-09-29 20:13:30 +02:00
Hermès Bélusca-Maïto
4ffe8e86f0 [FREELDR] disk/fs: Improve some TRACEs and comments (#8400)
- Enhance some TRACEs.
- Improve printf formatters.
- Checking for success is part of the operation, no need to comment on that.
2025-09-29 20:09:44 +02:00
Carl J. Bialorucki
5f243e66b6 [COM_APITEST][INCLUDE/REACTOS][PSDK] Fix com tests for WS03, Vista+ (#8343)
[COM_APITEST]
- Add NTDDI version gating to classes and interfaces in tests
- Remove rigid offset tests. Instead, offsets to known interfaces can be logged by defining LOG_COM_INTERFACE_OFFSETS.
- Replace the noreg member of the known interfaces array with a function pointer that can be used to determine if a com test should be globally registered depending on the current NTDDI version. I could probably replace this with a min and max registered NTDDI value, but I thought this was confusing for interfaces that are never globally registered.

[INCLUDE/REACTOS]
- Rename the existing interface definition for IShellBrowserService to IShellBrowserService_XP at {1307EE17-EA83-49EB-96B2-3A28E2D7048A}. This only exists on XP and Server 2003, no earlier or later versions.
- Rename IID_IShellBrowserServce to IID_IShellBrowserService since this definition is correct for Windows 7+ at {DFBC7E30-F9E5-455F-88F8-FA98C1E494CA}
- Add an interface definition for IShellBrowserService4 at {F5A24314-5B8B-44FA-BC2E-31285544B520}. This definition for IShellBrowserService exists for Vista only and no other version.

[PSDK]
- Add a define for NTDDI_WIN7SP1. While this isn't defined in the public Windows headers, it clearly exists in private headers because it is referenced in the public WinBase.h header.
2025-09-29 08:33:38 -05:00
Eric Kohl
98a8996954 [NETSH][IFMON] Make output windows compatible
- Help text string resources must be newline terminated.
- Format strings must not be newline terminated.
- Tested with WinXP ifmon.dll.
2025-09-28 23:23:46 +02:00
Eric Kohl
f5204f85b1 [PSDK] Fixes for _IP_ADAPTER_ANYCAST_ADDRESS_XP and _IP_ADAPTER_MULTICAST_ADDRESS_XP
Addendum to 43548291.
2025-09-27 23:23:05 +02:00
Doug Lyons
34fce8a997 [NTGDI][GDI32] SAI Paint Tool regression fix (#8383)
CORE-20336
Move some code in win32ss/gdi/ntgdi/dibobj.c into win32ss/gdi/gdi32/objects/bitmap.c.
Condition "YSrc = 0;" on "if (Height + YDest + 1 < ScanLines)" which fixes some gdi32:bitmap regressions.
2025-09-27 02:01:57 -05:00
Carl J. Bialorucki
435482912c [PSDK][INCLUDE/WINE] Header changes needed for iphlpapi, shlwapi, advapi32, and kernel32 winetest syncs (#8317)
- [INCLUDE/WINE] Add synced Wine headers for the iphlpapi winetest to use. This helps us slowly decouple our headers and wine's headers.
- [PSDK] Add definitions we are missing for other winetest syncs.
- [WINETESTS][APITESTS] Fix breaking changes, remove duplicate definitions for debugstr_guid.
2025-09-25 17:54:18 -05:00
Carl J. Bialorucki
4fafe46fc9 Add tristate option to fix cmd:attrib test (#8344)
- Add a tristate option to accept either true or false for the bStdOutput and bStdError tests
- Use this new option on the four tests that are inconsistent.
2025-09-25 15:18:24 -05:00
Hermès Bélusca-Maïto
c687f6e146 [MSGINA] Don't depend on powrprof.dll; fix shutdown from fancy dialog (#8391)
CORE-19104

- Use `NtPowerInformation()` and the `IS_PWR_*` macros instead.

- Fancy shutdown dialog:

  * Enable or disable the hibernate/sleep buttons depending on
    the previously-determined available shutdown options.

  * Don't invoke `ExitWindowsEx()` or `SetSuspendState()` directly
    within Msgina, but return a suitable `WLX_SAS_ACTION_SHUTDOWN_*`
    value, like what's done by the classic dialog. The power action
    proper is then performed by the caller of the shutdown dialog:
    either Shell32 or Winlogon.
2025-09-22 13:05:13 +02:00
Hermès Bélusca-Maïto
ecf718e48d [POWRPROF] Fix how & when the global registry semaphore is initialized (#8387)
CORE-19104

This fixes failure to create or open the `PowerProfileRegistrySemaphore`,
when it has been first created by a Process1 using powrprof from a "User1",
and while this process stays running, the semaphore is attempted to be
re-created (or opened) by another Process2 using powrprof from a different
"User2".

For example, this happens when "User1" is either the LocalSystem account
with the Process1 being Winlogon.exe (via the msgina.dll -> powrprof.dll
dependency), or, "Administrator" with the explorer.exe process when opening
the "Shutdown" dialog (via the shell32.dll -> runtime-loading of msgina.dll
-> powrprof.dll dependency),
AND,
"User2" being a non-administrator user and Process2 being explorer.exe,
again when opening the "Shutdown" dialog. In this situation, msgina.dll
fails to be loaded, because powrprof.dll fails in its `DllMain()` routine
-- see log excerpt below --, and the shell falls back to a minimal shutdown
confirmation dialog.

```
err:(dll\win32\powrprof\powrprof.c:1420) Couldn't create Semaphore: 5
(dll\ntdll\ldr\ldrinit.c:879) LDR: DLL_PROCESS_ATTACH for dll "powrprof.dll" (InitRoutine: 7ADC6DB0) failed
(dll\win32\kernel32\client\loader.c:386) LoadLibraryExW(msgina.dll) failing with status c0000142
err:(dll\win32\powrprof\powrprof.c:1420) Couldn't create Semaphore: 5
(dll\ntdll\ldr\ldrinit.c:879) LDR: DLL_PROCESS_ATTACH for dll "powrprof.dll" (InitRoutine: 7ADC6DB0) failed
(dll\win32\kernel32\client\loader.c:386) LoadLibraryExW(msgina.dll) failing with status c0000142
(dll\ntdll\ldr\ldrutils.c:2340) Image explorer.exe has no exports, but were trying to get procedure (null). BaseAddress asked 0x00400000, got entry BA 0x00400000
err:(win32ss\user\user32\windows\messagebox.c:1048) MessageBox: L"Do you want to shutdown?"
```
2025-09-22 13:03:21 +02:00
Eric Kohl
918bc859a9 [NETSH] Create a root helper object
The root helper object is required to load ifmon.dll from WinXP.
2025-09-21 23:55:18 +02:00
Hermès Bélusca-Maïto
b6e732ec71 [NTDLL_APITEST] Add simple tests for RtlUnhandledExceptionFilter(2) (#8353)
Based on an example from Whindmar Saksit.
2025-09-21 18:17:27 +02:00
Hermès Bélusca-Maïto
fa7eca6cd9 [NDK] Expose RtlUnhandledExceptionFilter2() (#8353) 2025-09-21 15:18:15 +02:00
Hermès Bélusca-Maïto
db69a9a7e1 [RTL][NDK] Improve RtlUnhandledExceptionFilter(2) (#8353)
- Reimplement `RtlUnhandledExceptionFilter()` by just calling
  `RtlUnhandledExceptionFilter2()`.

- Return an adequate exception filter value `EXCEPTION_CONTINUE_SEARCH`
  from `RtlUnhandledExceptionFilter2()`, instead of some random error.
  If `ExceptionCode` is `STATUS_POSSIBLE_DEADLOCK` however, return
  `EXCEPTION_CONTINUE_EXECUTION` instead, as shown by a test from Whindmar Saksit.

- The second parameter of `RtlUnhandledExceptionFilter2()` is not
  a flag, but a pointer to string `PCSTR` !
  See https://skanthak.hier-im-netz.de/download/NTDLL.H
  who is the only one online who has the correct definition,
  whose usage I've double-checked on Win7 ntdll.dll.

  This is used in the `<function_name>` slot in the displayed
  debugger message:
  ```
  *** An Access Violation occurred in <program_command_line>:<function_name>
  The instruction at <address> tried to write to a NULL pointer
  ```
  For example, see: https://community.osr.com/t/access-violation/33435
2025-09-21 15:18:14 +02:00
Hermès Bélusca-Maïto
92f680dddb [NDK] Fix the RTLP_UNHANDLED_EXCEPTION_FILTER type (#8353)
Confirmed with the System Informer phnt headers.
2025-09-21 15:18:13 +02:00
Eric Kohl
f0a29c9e9c [NETSH] Improve MatchToken and implement MatchEnumTag 2025-09-21 14:00:00 +02:00
Hermès Bélusca-Maïto
13d70840ff [CTFMON] Some fixes for event handles management (#8392)
- Validate the opened `WinSta0_DesktopSwitch` handle;

- Don't pass the `ahEvents` array containing a NULL pointer to
  `MsgWaitForMultipleObjects()`, but provide the correct number
  of non-NULL handles, otherwise the function fails and the code
  ends up busy-looping.

- Validate the `MsgWaitForMultipleObjects()` result: bail out if
  `WAIT_FAILED` is returned.

- Validate the event index passed to `CRegWatcher::InitEvent()`
  and `CRegWatcher::OnEvent()`.

- Rename `WATCHENTRY_MAX` to `WI_REGEVTS_MAX` and add it in the
  `WATCH_INDEX` enumeration.

- Fix some code comments.
2025-09-20 22:01:34 +02:00
Hermès Bélusca-Maïto
d524fd8e4b [POWERCFG] Various enhancements (#8389)
- Don't hardcode buffer sizes.
- `ShowWindow()` 2nd parameter is an `SW_*` flag, not `TRUE`/`FALSE`.
- The "FIXME: Add battery page" comment is outdated since commit 4bdbb3092c
- Use standard `IDC_STATIC` instead of `-1` for resource control IDs.
- `AUTOCHECKBOX` already contains `WS_TABSTOP`, no need to add it explicitly.
- Reformat file headers.
2025-09-20 18:28:21 +02:00
Eric Kohl
f9458d9e40 [NETSH] Add stubs for undocumented exported functions 2025-09-20 11:10:52 +02:00
Timo Kreuzer
9ab8761f2c [NTDLL] Improve x64 KiUserExceptionDispatcher
Add Wow64PrepareForException handler, which is well documented as a hook for KiUserExceptionDispatcher (see e.g. https://github.com/brew02/KiUserExceptionDispatcherHook) and used by ntdll_winetest.
This also reloads rcx and rdx for the call to RtlDispatchException from the stack instead of relying on the registers to be set up by the kernel, which again is a feature used by ntdll_winetest, which calls this function from a hook with zeroed registers.
2025-09-17 15:48:26 +03:00
Justin Miller
9f78833b4a [OPENGL32] Fix GL_GETINFO ExtEscape call based on mesa MR (#8351)
Just pulls some information from:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4305

Fixes AMD's OpenGL loading when the ctl is made for pulling this information.
2025-09-16 13:39:05 +00:00
Timo Kreuzer
11bb8e4ed0 [RTL] Fix dynamic function tables 2025-09-16 16:23:37 +03:00
Serge Gautherie
9aaa898319 [GITHUB] build-msvc-arm: Limit ARM to windows-2022 (#8363)
Needed SDK support is not available on windows-2025.
Also, tweak toolset line.

CORE-20325 CORE-17604
2025-09-16 13:04:28 +03:00
Eric Kohl
e5b2d5c51e [IFMON] Add option to select an interface to the show commands 2025-09-15 22:59:34 +02:00
Eric Kohl
b6c202c4c8 [NETSH] Set proper error code for internal commands 2025-09-15 22:37:22 +02:00
Hermès Bélusca-Maïto
0f105936cb [POWERCFG] Use the IS_PWR_* macros (#8386) 2025-09-15 16:41:00 +02:00
Hermès Bélusca-Maïto
103c81849f [POWRPROF] Use the IS_PWR_* macros (#8386) 2025-09-15 16:40:59 +02:00
Hermès Bélusca-Maïto
ae4c5b9a8d [NDK] potypes.h: Add useful macros for SYSTEM_POWER_CAPABILITIES (#8386)
Add useful macros, similar to the powrprof.dll `IsPwr*()` functions,
but that are suitable when one has a `SYSTEM_POWER_CAPABILITIES`
structure initialized from `NtPowerInformation(SystemPowerCapabilities)`.

- `IS_PWR_SUSPEND_ALLOWED()`, equivalent to `IsPwrSuspendAllowed()`,
  indicating whether any of the S1, S2, S3 sleep states are supported.

- `IS_PWR_HIBERNATE_ALLOWED()`, equivalent to `IsPwrHibernateAllowed()`,
  indicating whether the S4 sleep state is supported and the
  hibernation file is present.

- `IS_PWR_POWEROFF_ALLOWED()`, equivalent to `IsPwrShutdownAllowed()`,
  indicating whether the S5 "soft-off" state is supported.
2025-09-15 16:40:49 +02:00
Hermès Bélusca-Maïto
1af29a66ca [CMBATT] Inform when a discovered battery doesn't support the _BTP trip-point method (#8384) 2025-09-15 16:26:06 +02:00
Hermès Bélusca-Maïto
b73159fecf [BATTC][COMPBATT] Move the IOCTL_BATTERY_QUERY_STATUS wait hack to BATTC (#8384)
CORE-20343

The 3-second timeout FIXME (instead of waiting indefinitely), made in the
COMPBATT worker thread for the `IOCTL_BATTERY_QUERY_STATUS` case, was done
because _*our*_ BATTC handler expects the batteries to always support the
BTP (Battery Trip Point) feature for signaling a change of battery status,
but in the cases where it isn't supported, any waits it tried for the
battery to notify about a status change would never happen.

Furthermore, following commit 3a6e0d4b65, the `SetStatusNotify()` call
(_which always fails if the battery doesn't support the BTP feature_)
would now always exit the `IOCTL_BATTERY_QUERY_STATUS` handling without
any waiting nor battery polling [^1], and this would cause the COMPBATT
worker thread to busy-poll again forever.

The timeout FIXME is now moved to BATTC, instead of COMPBATT, since the
actual fixes should be in BATTC. In particular, it should queue all the
query IOCTLs and then serve them, either using the StatusNotify (BTP)
functionality if the battery supports it, or if not, do a very-slow
battery polling.

I've also increased the timeout a little bit more (5 seconds and not 3).

[^1]: Per the ACPI specification, it is expected that the operating system
  performs battery polling if the battery doesn't support BTP, see:
  https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/10_Power_Source_and_Power_Meter_Devices/Power_Source_and_Power_Meter_Devices.html#btp-battery-trip-point
2025-09-15 16:25:14 +02:00
Hermès Bélusca-Maïto
54489d6cce [CMBATT] Fix a debug print 2025-09-15 16:25:13 +02:00
Eric Kohl
9e22156c50 [NETSH] Pass correct dwCurrentIndex parameter to context and group commands 2025-09-15 01:27:15 +02:00
Eric Kohl
3f4cee1790 [NETSH] Fix MatchToken to test for a real prefix 2025-09-14 22:33:00 +02:00
Eric Kohl
245bc3f44a [NETSH] Simplify the code by naming the root context 'netsh'
-
2025-09-14 22:14:21 +02:00
Hermès Bélusca-Maïto
20d7fd78ae [CMBATT] Fix "TripPpoint" typo 2025-09-13 21:34:18 +02:00
Hermès Bélusca-Maïto
13dc901d8c [KERNEL32][SVCHOST] LoadLibraryEx 2nd parameter is a handle, so, 0 -> NULL 2025-09-13 21:34:10 +02:00
Timo Kreuzer
571ac5e608 [NTOS:PO] Implement SystemBatteryState in NtPowerInformation
This should get us proper battery status display.
2025-09-13 11:38:38 +03:00
Timo Kreuzer
3a6e0d4b65 [BATTC] Fix IOCTL_BATTERY_QUERY_STATUS
Previously the function waited for the conditions *after* querying the status, and then returned the old status. Also, if querying failed, it waited and when the wait timed out it returned STATUS_SUCCESS without returning any data. If the call to SetStatusNotify failed and there was no timeout, it would wait forever.
This is all fixed now.
2025-09-13 11:38:38 +03:00
Eric Kohl
ae23b4dc8f [NETSH] Add the PreprocessCommand stub 2025-09-13 09:53:46 +02:00