It is the same function as RtlInterlockedPushListSList, but with stdcall calling convention instead of fastcall.
On x86 this is a wrapper, on all other architectures it is simply a forwarder.
- Don't compile the non-conformng swprintf (it is identical to _swprinf)
- Rename swprintf to _swprintf
- Forward non-conforming exports to the underscored versions in CRT dlls
Fix KiWriteSystemTime and move it to NDK. The previous implementation of KiWriteSystemTime was broken and updated the fields in the wrong order. Before that it was right for SystemTime and wrong for InterruptTime. ExpSetTimeZoneInformation had it wrong for the TimeZoneBias.
Add KiReadSystemTime to read KSYSTEM_TIME values correctly, instead of doing it manually (and partly wrongly) all over the place.
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.
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 <[email protected]>
Stop pointless target_sources(xxx PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>). The only effect it has is to force the object file into the target, which was already done by specifying the libraries as OBJECT libraries, which is also pointless, and only leads to problems.
- [NTDLL] Add a stub for a Win7+ function that we need to link to when the DLL_EXPORT_VERSION is high enough. This is needed for the kernel32 winetest sync to wine-10.0.
Windows ntdll and ntoskrnl export a multibyte capable version of toupper (not tolower though!)
The internal version is kept as it is, because the multibyte version requires unicode tables to be set up and doesn't support IRQL > APC_LEVEL.
Why though would toupper (but not tolower) support raw, undecoded multibyte characters, you might ask. Well I don't know, but someone at MS must have decided that this is a good idea, and winetests show this is how it behaves.
CORE-20195
- Fix ntdll mistakenly being set to version 0x601 instead of 0x601+
- Add the stdcall to kernel32.spec which just reroutes to ntdll and seems to properly fix the 2 missing api calls.
* [NTDLL][WINE] Fix *FlushVirtualMemory() parameter types
* [NTOS:MM] MmFlushVirtualMemory(): Pretend success
Yet, set IoStatusBlock's actual data.
Based on Jira hack patch by KRosUser.
Addendum to b445005c70 (0.4.15-dev-2306).
CORE-19589
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.
Allows "ROS as a workstation" installs to report itself as a basic server to Win32 applications when the user toggles the sysdm.cpl checkbox (to unchecked in this case).
Mostly based on Windows 11 22H2 and Vista SP2 and WINE-10.0
Co-authored-by: Adam Słaboń <[email protected]>
Co-authored-by: Timo Kreuzer <[email protected]>
Implement DLL Load Notification, an NT6+ feature.
https://learn.microsoft.com/en-us/windows/win32/devnotes/dll-load-notification
- [RTL] Sync `RTL_STATIC_LIST_HEAD` and `RtlFailFast` from XDK to NDK.
- [NTDLL_VISTA] Introduce ntdll_vista_static static library and link both ntdll_vista and ntdll to it.
- [NDK][LDR] Add and fix DLL Notification definitions.
- [NTDLL_VISTA] Code improvements.
- [NTDLL_VISTA:LDR] Implement Dll Notification.
- [NTDLL][NTDLL_APITEST] Add Dll Notification API test.
This avoids a linker error due to a duplicated symbol in ntdll and the statically linked chkstk library. This happens when the linker first resolves _chkstk from the CRT or the chkstk library (which also pulls in _alloca_probe(_16)) and then tries to resolve _alloca_probe(_16) from ntdll.
* [WINESYNC] ntdll: Add support for parsing application settings in manifests.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id fc14442970dc6b97032c3cdd76cab33d774dc1a2 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Implement RtlQueryActivationContextApplicationSettings.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 14b9a5af0b44d7e2ca5232ad810c77e561d5d30c by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Propagate the error through the XML buffer in manifest parser.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 7b871727e5cbb8581167acbaae2f4e34dc4ee59e by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Check the namespace in RtlQueryActivationContextApplicationSettings.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id e46259fb823f55aa331381fe56916d20049d52f2 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 10f23ddb58b0583c8bce99e59d879c653b389363 by Michael Stefaniuc <[email protected]>
* [WINESYNC] ntdll/actctx: Don't stop looking for manifest if dll without manifest is found.
Signed-off-by: Fabian Maurer <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 56b3304a019486b52681a05d4b5454b475275e51 by Fabian Maurer <[email protected]>
* [WINESYNC] ntdll: Use the current platform as processorArchitecture instead of a wildcard.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 6abf99b4803003812d4fcf7bf9effc99030cbec9 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 6fc259a57dafab9e72af13980c021e2a59257935 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Avoid dead initialization (scan-build).
Signed-off-by: Alex Henrie <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 6ea282c7e1abd7ab09a5f0a18a437e63f909da96 by Alex Henrie <[email protected]>
* [NDK] Add RtlUTF8ToUnicodeN for user mode
* [WINESYNC] ntdll: Use the Rtl UTF8 conversion functions.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id f46fa9c92d08c6e656bc22b94e09aa9dbe7d3be9 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use module path as assembly path for manifests embedded in resources.
Fixes Office 2016 installer, which removes its .exe directory from load
path, but expects to be able to load files listed in manifest.
Signed-off-by: Jacek Caban <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 2d764e90dd2c624f7a2d863ab29bd418ed33d252 by Jacek Caban <[email protected]>
* [WINESYNC] ntdll: Store the default process activation context into the PEB.
Signed-off-by: Gabriel Ivăncescu <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id e95d0813fdfcfcac2bb1761e62e1d54e6f73cd6d by Gabriel Ivăncescu <[email protected]>
* [WINESYNC] ntdll: Use wcsicmp() instead of strcmpiW() where possible.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 3e049b6b962b8e6f048101b9910c09d5b1d8f167 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use wcsnicmp() instead of strncmpiW() where possible.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id f831b3bd3d6b013893be7645df3a9cd05289c415 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use RtlEqualUnicodeString() instead of strcmpiW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 4d93bafe961ed53488ff0fb4b44cb1ad085531fe by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Avoid using memchrW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 186f189107972b739311f95a4ba3833838349b32 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Avoid using atoiW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 8f3d869d784753d814a3493d01c3650f45389eda by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Avoid using sprintfW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id eb1b2e548656dc3d08cbf3c35454621491b84126 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use wcscpy() instead of strcpyW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 18411a19b4ea3a68234980c56d4c252670dfc000 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use wcscat() instead of strcatW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 80005ee016aeed42967adfe5b3042803d008c50d by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use wcschr() instead of strchrW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 6de0ab276b3b79db4331993316f529a43f67c29a by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use wcsrchr() instead of strrchrW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 285c5490a4c0ee4a92d042a3e6ab32e6bc14fb49 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use wcslen() instead of strlenW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id e003b9884edcccc417d41d30073b312648741aaa by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use wcscmp() instead of strcmpW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 4501ab0a7c80e31e602c540a446809e8ae3ebade by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use wcsncmp() instead of strncmpW().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id e36b97e1d0644f90606d27f5104bb09a910540d2 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Make the windows directory a global variable.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id ca13f489e18fb1f7944e3bdcfdfc4a810bf80994 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Use single field for misc flags in ComClass redirection section.
Signed-off-by: Nikolay Sivov <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 72d055854b59db9059a3465f1e65247c0cc5e94e by Nikolay Sivov <[email protected]>
* [WINESYNC] ntdll: Create class section for proxy-stub interface entries.
Signed-off-by: Nikolay Sivov <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id dd9295b415345f2b686b65bd05fae0320cf6dc39 by Nikolay Sivov <[email protected]>
* [WINESYNC] ntdll: Use the standard C library names for the printf functions.
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id 4478ba258e45559ac97353ab27951e84dd9865c1 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Implement RtlActivateActivationContextEx().
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id c71da19d24a5d6f01e65b3b3691a9d7dd17a2278 by Alexandre Julliard <[email protected]>
* [WINESYNC] ntdll: Fix a memory leak (Valgrind).
Signed-off-by: Chao Long <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
wine commit id d0946955ec21e4da57aaec92459f81f131b27a49 by Chao Long <[email protected]>
* [WINESYNC] rtl is now in sync with wine-staging wine-5.18
---------
Co-authored-by: winesync <[email protected]>
Co-authored-by: winesync <[email protected]>
This removes all fake apiset forwarders,
and handles apisets inside ntdll.
This is not 100% compatible with how windows does it, but it should be good enough for us.