Commit graph

3447 commits

Author SHA1 Message Date
Eric Kohl
94a6102cd2 [DHCPCSVC] Convert the pipe based client-server interface to RPC 2025-08-03 22:39:36 +02:00
Eric Kohl
a6d3787507 [DHCPCSVC] Remove obsolete functions
DhcpLeaseIpAddress, DhcpReleaseIpAddressLease and DhcpRenewIpAddressLease have been replaced by DhcpAcquireParameters and DhcpReleaseParameters
2025-08-03 14:14:18 +02:00
Eric Kohl
959d3b9604 [CMAKE] Add add_rpc_file macro
The add_rpc_file macro enables us to use ACF files or set prefixes.
2025-08-03 11:06:32 +02:00
Timo Kreuzer
73b54ce2a6 [PSDK] Improve some headers 2025-08-03 10:37:24 +03:00
Timo Kreuzer
d6cfd00ae2 [XDK] Add Read/Write helper functions 2025-08-03 10:37:24 +03:00
Timo Kreuzer
c70f741627 [VCRUNTIME] Add initial intrin0.inl.h 2025-08-03 10:37:24 +03:00
Timo Kreuzer
41478e978c [VCRUNTIME] Add initial arm64intr.h 2025-08-03 10:37:24 +03:00
Timo Kreuzer
2d43fd458c [WINE] Header improvement
Add some sdk/ddk headers that contain wine specific definitions.
2025-08-03 10:37:24 +03:00
Timo Kreuzer
f5612437ee [PSDK] Update ntstatus.h 2025-07-31 16:00:13 +03:00
Timo Kreuzer
e195303889 [PSDK][XDK] Update some definitions 2025-07-31 16:00:13 +03:00
Timo Kreuzer
05dc65bd17 [PSDK] Add ioapiset.h 2025-07-31 16:00:13 +03:00
Timo Kreuzer
76ef3c45a5 [PSDK] Add minwinbase.h 2025-07-31 16:00:13 +03:00
Timo Kreuzer
db2889a983 [PSDK] Add minwindef.h 2025-07-31 16:00:13 +03:00
Carl J. Bialorucki
b86422cd4b
[SHELL32_APITEST] Several fixes (#8266)
Fix the shell32 apitests so that they pass on Windows Server 2003 - Windows 10. Many of these fixes are for Vista+, but the most important fixes are for ShellExecCmdLine and FindExecutable which had issues closing windows after tests and deleting test files. Failing to delete these files breaks the other test (i.e. running ShellExecCmdLine would break FindExecutable and vis-versa.)
2025-07-29 14:06:13 -06:00
Carl J. Bialorucki
c9842e5aad
Move /sdk/include/reactos/wine to /sdk/include/wine, reorder global includes, remove unneeded includes (#8258)
- Move sdk\include\reactos\wine to sdk\include\wine
- Reorder the directories in include_directories() to be closer to alphabetical. This should make it easier to determine what global include directories can be removed in the future.
2025-07-29 13:57:12 -06:00
Timo Kreuzer
719ea022ec [UCRT] Fix GCC/Clang SIMD compilation
GCC and Clang need to mark functions that use SSE/AVX etc, either with a function attribute or a pragma around the function. strlen uses a template function that either uses SSE2 or AVX2. Previously the template was surrounded with pragmas to allow both SSE2 and AVX2, but that makes GCC assume that it can use AVX2 instructions even in the SSE2 version. To fix this the template instances are now build in individual compilation units for SSE2 and AVX, separate from the "dispatcher" function.
Now ucrtbase doesn't crash anymore on GCC build.

Another issue was the namespace around strnlen_mode, which has confused clang so much, that it forgot to instantiate the template code.
2025-07-29 09:22:15 +03:00
Timo Kreuzer
e2deec8235 [UCRT] Fix __crt_fast_encode_pointer
GCC was optimizing away the xor with __security_cookie when passing nullptr_t, because the return value was also nullptr_t, assuming it must be nullptr.
2025-07-29 09:22:15 +03:00
Hermès Bélusca-Maïto
50b1242e99
[WLNTFYTESTS] Add extended tests for the Winlogon notifications
Introduce and use a minimal testing framework (minitest.h) based on
an updated version of `wine/test.h`.

Each notification handler becomes its own test. Useful macro and
function helpers have been introduced to simplify the code that is
duplicated for each handler.

See commit 38d07d3a24 (PR #8234) for the details of how to install
and use the notification dll.

These tests can exercise the notifications in the four cases, where
asynchronous events and user impersonation can be independently
enabled or disabled. To do this, the `Asynchronous` and `Impersonate`
registry `REG_DWORD` values, inside the `WLNotifyTests` subkey of:
  `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify`
must be set to their intended values[^1].

----

[^1]: https://learn.microsoft.com/en-us/windows/win32/secauthn/registry-entries

----

Current test results:

- When each notification is emitted, the DLL is loaded then unloaded:
  ```
  err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1307)
  WLNOTIFY(ac.b0):  Entering `DllMain`(hInst: 0x10000000, dwReason: 0x1, pReserved: 0x00000000)
  ...
  err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1307)
  WLNOTIFY(ac.b0):  Entering `DllMain`(hInst: 0x10000000, dwReason: 0x0, pReserved: 0x00000000)
  ```
  This doesn't happen on Windows. And indeed, it should _not_ happen,
  because otherwise the DLL would loose any of its internal global state
  between consecutive notification calls. This currently happens in
  ReactOS, where we can observe the following:
  ```
  modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:788: Test failed: **** WLEventLogon: ERROR: Wrong state NON-INITIALIZED, expected Startup or Logoff
  ...
  err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1036) **** WLEventLogon: Changing state NON-INITIALIZED to Logon
  ```
  and similar for every other notification.

- Test results for each notification:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventStartShell: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  -- Note: missing WLEventPostShell --
  WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventUnlock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 10 failures), 0 skipped.
  WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 0 skipped.
  WLEventLogoff: 30 tests executed (0 marked as todo, 5 failures), 2 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 5 failures), 0 skipped.
  ```
2025-07-28 22:04:05 +02:00
Eric Kohl
7e1d9ef9bf [DHCPCSVC] Add DhcpEnumClasses and DhcpHandlePnpEvent stubs 2025-07-26 19:00:04 +02:00
Timo Kreuzer
9750f6decd [RTL/x64] Improve RtlUnwindInternal
- Implement RtlpExecuteHandlerForUnwind in asm
- Implement RtlpExecuteHandlerForUnwindHandler
- Use the correct context in DISPATCHER_CONTEXT when unwinding
- Handle collided unwinds
2025-07-20 10:42:26 +03:00
Eric Kohl
28b35625dd [DHCPCSVC] Change AdapterName parameter to UNICODE
DhcpAcquireParameters and DhcpReleaseParameters use a UNICODE AdapterName parameter.
2025-07-18 23:31:21 +02:00
George Bișoc
a5ab400689
[SDK] Swap initguid and wdm headers
The WDM header contains power manager related GUIDs that were declared but never initialized properly due to the fact the initguid.h header wasn't at the top.
This patch fixes a linker error in the kernel where GUIDs like GUID_LIDSWITCH_STATE_CHANGE are used.
It's a hotfix for 624c3fd.
2025-07-16 22:08:55 +02:00
George Bișoc
624c3fd847
[SDK] Introduce the PO GUID library
This library aims to include all the public and global power manager related GUID identifiers into one shared library, of which they can be accessed across multiple modules of ReactOS, e.g. the kernel, ACPI, PCI, et al.

This patch is needed for the development of the Power Manager (#5719) to continue.

CORE-18969
2025-07-16 20:15:15 +02:00
Dmitry Borisov
b558596409
[SPTILIB] Introduce SPTI static library for storage drivers (#8209)
Add a SCSI and ATA passthrough support helper library for direct use
from low-level storage drivers.

Tested with: CDRoller, CloneCD, Magic ISO
NOTE: Vbox seems to lack support for CD/DVD burning; tested on real hardware.

CORE-10191 CORE-16452
CORE-14788 CORE-18241
CORE-17256 CORE-13866
2025-07-13 22:49:51 +02:00
Carl J. Bialorucki
117cd33b49
[PSDK] Sync winerror.h with wine-10.0 (#8244)
- Sync winerror.h to wine-10.0
- Fix a couple hacks that existed because we didn't do this sooner
- Fix an instance where Wine compares a pointer to S_OK to see if it's null
2025-07-11 14:12:09 -06:00
Oleg Dubinskiy
206b52833f [MMIXER] HACK: Decrease SteppingDelta for each volume value by 1
This workarounds broken changing volume level for left and right volume controls separately ("Speakers Volume" button in "Sound" tab of mmsys.cpl).
CORE-19190
2025-07-10 14:02:23 +02:00
Oleg Dubinskiy
376708b586 [MMIXER] Fix improperly working volume control
Fix broken volume level changing and left/right speakers balance level changing.
Get and set volume level value for all available output channels instead of only the 1st channel (available in MIXERCONTROLDETAILS.cChannels member), so other channels don't have a non-set volume values now. This allows to control the volume for all channels.
So now the volume control works correctly and hence, the volume level can be properly changed from Sound Properties (mmsys.cpl) and Volume Mixer (sndvol32.exe) as well.
Note that the volume level settings changed by user are not saved after reboot yet. We need to save (write) and then load (read) them at next boot from HKLM/System/CurrentControlSet/Control/DeviceClasses/KSCATEGORY_AUDIO/.../DeviceParameters/Mixer/.../* keys inside wdmaud.sys, similarly to as it's done in Windows XP/2003. It can be tested (and is tested sveral times by me and is confirmed) by using MS wdmaud.sys in ReactOS. It writes the values in that key, so the actual volume values are stored there.
Another key, HKCU/SOFTWARE/Microsoft/Windows/Applets/Volume Control/, is created and managed by sndvol32.exe instead, so it does not contain the actual values of volume levels.
CORE-17976
2025-07-10 14:02:23 +02:00
Timo Kreuzer
f026550f89 [RTL] Implement RtlGetUnwindContext 2025-07-10 14:57:09 +03:00
Timo Kreuzer
98ed87b556 [RTL] Fix RtlSetUnwindContext
Only set the registers requested by ContextFlags
2025-07-10 14:57:09 +03:00
Timo Kreuzer
d23ee5f365 [PSEH] Make structures more SEH3 compatible 2025-07-10 11:15:23 +03:00
Timo Kreuzer
cfb579dd67 [PSEH3] Fix unlinking of EH frames during unwind.
On Windows the function that calls the language specific exception handler function registers it's own exception handler, so the top of the exception chain does not point to our own handler. We need to take that into account when unwinding the stack and removing each handler as we go.
2025-07-10 11:15:23 +03:00
Timo Kreuzer
ff8d24cabb [PSEH3] Fix _SEH3_LEAVE
Previously, when leave was used in the except or finally block of a nested try block, it would jump back to the start of the except/finally block, resulting in an endless loop. This is fixed by jumping back to a label at the beginning of the try block, which is only visible from within the try block itself and from there to the end of the SEH block.
Fixes seh0055 testcase of MS SEH tests.
2025-07-10 11:15:23 +03:00
Justin Miller
02343c22f6
[RTL] Partial revert of Wine timer code in thread pooling (#8229)
* [SDK] Partial Revert of 0bf42067d2

It was found that the timer code from WINE doesn't work as well as ours,
This is a revert from that part of the PR as it doesn't change any of the real threadpool code in all reality. Thanks to the investigation of Julenuri and Simone
JIRA issue: CORE-20245
2025-07-08 12:05:53 -07:00
Vitaly Orekhov
5ffc6ceb55
[PSEH] Guard SEH2 macros for Clang on Linux x64 builders (#8194)
Hackfixing a corner case detected via broken entities of wlanwiz
due to its usage of STLport. This was already done to PSEH3 prior to me.

Corner case examples:
- broken: 1591123914
- "fixed": 1594570563

Guard SEH2 family macros behind #ifndef. CORE-6622 CORE-6905
2025-07-07 15:24:27 +03:00
Whindmar Saksit
212a1a5c74
[SDK][SHELL32_APITEST] Fix some warnings (#7031) 2025-07-06 21:12:37 +02:00
Carl J. Bialorucki
a753f34e30
[PSDK][XDK][NDK][INCLUDE/WINE] Make header changes to sync crypt32, kernel32, and user32 winetests (#8114)
- [PSDK] Sync wincrypt.h to Wine 10.0, keeping our SAL annotated function definitions behind an #ifdef guard
- [XDK] Add definitions to our winnt header that Wine 10.0's winternl.h depends on.
- [INCLUDE/WINE] Sync winternl.h to Wine 10.0
- [OTHER] Fix breaking changes with the synced winternl.h.
2025-07-05 15:14:31 -06:00
Whindmar Saksit
375fca5058
[SHELL32] Implement SHSimulateDropOnClsid (#8223) 2025-07-05 18:18:51 +02:00
Timo Kreuzer
2cd05a3756 [NDK] Update SYSTEM_INFORMATION_CLASS
See https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/api/ntexapi/system_information_class.htm and Windows 10/11 pdb files
2025-07-03 22:21:05 +03:00
Katayama Hirofumi MZ
0db7879a66
[CMAKE] msvc.cmake: Add /wd4819 for Far East Asian (#8219)
"Far East Asian" Visual Studio had
generated a lot of "warning C4819:
File contains characters that
cannot be displayed in the current
code page...".

JIRA issue: N/A
2025-07-02 22:10:54 +09:00
Timo Kreuzer
c507b701ab [CRT:MATH] Import frexp from musl 2025-06-30 09:19:47 +00:00
Timo Kreuzer
b734e3ba63 [CRT:MATH] Move some math functions from ucrt to crt 2025-06-30 09:19:47 +00:00
Timo Kreuzer
a9ee20cb9a [CRT:MATH] Import nextafter, nextafterf and nexttowardf from musl
Note: On Windows, where a long double is the same as a double, nextafterl is the same as nextafter, nexttowardl is the same as nexttoward.
Also nexttoward is the same as nextafter.
2025-06-30 09:19:47 +00:00
Timo Kreuzer
5c26ccdb29 [CRT:MATH] Import scalbn/scalbnf from musl 2025-06-30 09:19:47 +00:00
Timo Kreuzer
3f71ab80ad [CRT:MATH] Implement _isnan and _isnanf 2025-06-30 09:19:47 +00:00
Timo Kreuzer
e01231bd49 [CRT:MATH] Implement _finite, _finitef 2025-06-30 09:19:47 +00:00
Timo Kreuzer
50028685dc [CRT:MATH] Implement _dsign and _dsignf 2025-06-30 09:19:47 +00:00
Timo Kreuzer
0e5d6af68e [CRT:MATH] Implement x86 sse2 math functions
These are just wrappers around the normal functions and lack any optimization.
2025-06-30 09:19:47 +00:00
Timo Kreuzer
5c6912f561 [CRT][UCRTBASE] Add round/roundf 2025-06-30 09:19:47 +00:00
Timo Kreuzer
d736b55644 [CRT:MATH] Fix a bug in _handle_error 2025-06-30 09:19:47 +00:00
Timo Kreuzer
35bc1e1d9e [CRT] Add crtmath library 2025-06-30 09:19:47 +00:00