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.)
- 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.
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.
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.
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.
```
- Implement RtlpExecuteHandlerForUnwind in asm
- Implement RtlpExecuteHandlerForUnwindHandler
- Use the correct context in DISPATCHER_CONTEXT when unwinding
- Handle collided unwinds
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.
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
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
- 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
This workarounds broken changing volume level for left and right volume controls separately ("Speakers Volume" button in "Sound" tab of mmsys.cpl).
CORE-19190
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
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.
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.
* [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
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
- [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.
"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
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.