CORE-19724
sdk/lib/cmlib/cmcheck.c: Print the HCELL_INDEX indices in hexadecimal.
------------------
sdk/lib/cmlib/cmcheck.c:321:60: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'ULONG' {aka 'unsigned int'} [-Wformat=]
and at lines 341, 357, 374, 554, 579, 733, 760, 801, 984, 1003, 1458,
1476, 1521, 1551, 1670
sdk/lib/cmlib/cmcheck.c:1251:65: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'HCELL_INDEX' {aka 'unsigned int'} [-Wformat=]
and at lines 1282, 1303, 1551
sdk/lib/cmlib/cmcheck.c:1326:79: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'LONG' {aka 'int'} [-Wformat=]
sdk/lib/cmlib/cmcheck.c:1684:76: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'CM_CHECK_REGISTRY_STATUS' {aka 'unsigned int'} [-Wformat=]
and at line 1711
------------------
sdk/lib/cmlib/cmheal.c:223:108: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'ULONG' {aka 'unsigned int'} [-Wformat=]
and at lines 240, 319, 335
sdk/lib/cmlib/cmheal.c:480:79: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=]
------------------
sdk/lib/cmlib/hiveinit.c:976:62: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'ULONG' {aka 'unsigned int'} [-Wformat=]
and at lines 988, 1492
This fixes ExceptionContinueExecution cases, where we want to continue execution on the original context (or as modified by the handler), not on some halfway unwinded one.
- Add bugcodes dependency, fixes a rare build failure
- Fix for the sync part of commit 823fdb19d7, somehow it didn't pick up the change from the upstream commit b22efbb8b8
__ftol2 is exported from msvcrt on NT6+, not from ntdll for some reason. So native apps still need to statically link _ftol2 and _ftoul2_legacy, but apps linking to msvcrt only need to statically link _ftoul2_legacy (via msvcrtex), when on NT6+.
This is used by CL v19.41+. It replicates the behavior of the inline assembly code that previous CL versions generated. According to tests it works the same as with previous VS versions.
__throw_out_of_range_fmt is implemented in libstdc++, but it is needed by libsupc++ and that would mean we would have to link all C++ code to libstdc++.
* [WINESYNC] ntdll: Add support for parsing application settings in manifests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fc14442970dc6b97032c3cdd76cab33d774dc1a2 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Implement RtlQueryActivationContextApplicationSettings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 14b9a5af0b44d7e2ca5232ad810c77e561d5d30c by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Propagate the error through the XML buffer in manifest parser.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 7b871727e5cbb8581167acbaae2f4e34dc4ee59e by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Check the namespace in RtlQueryActivationContextApplicationSettings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e46259fb823f55aa331381fe56916d20049d52f2 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 10f23ddb58b0583c8bce99e59d879c653b389363 by Michael Stefaniuc <mstefani@winehq.org>
* [WINESYNC] ntdll/actctx: Don't stop looking for manifest if dll without manifest is found.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 56b3304a019486b52681a05d4b5454b475275e51 by Fabian Maurer <dark.shadow4@web.de>
* [WINESYNC] ntdll: Use the current platform as processorArchitecture instead of a wildcard.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6abf99b4803003812d4fcf7bf9effc99030cbec9 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6fc259a57dafab9e72af13980c021e2a59257935 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Avoid dead initialization (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6ea282c7e1abd7ab09a5f0a18a437e63f909da96 by Alex Henrie <alexhenrie24@gmail.com>
* [NDK] Add RtlUTF8ToUnicodeN for user mode
* [WINESYNC] ntdll: Use the Rtl UTF8 conversion functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f46fa9c92d08c6e656bc22b94e09aa9dbe7d3be9 by Alexandre Julliard <julliard@winehq.org>
* [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 <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2d764e90dd2c624f7a2d863ab29bd418ed33d252 by Jacek Caban <jacek@codeweavers.com>
* [WINESYNC] ntdll: Store the default process activation context into the PEB.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e95d0813fdfcfcac2bb1761e62e1d54e6f73cd6d by Gabriel Ivăncescu <gabrielopcode@gmail.com>
* [WINESYNC] ntdll: Use wcsicmp() instead of strcmpiW() where possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 3e049b6b962b8e6f048101b9910c09d5b1d8f167 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use wcsnicmp() instead of strncmpiW() where possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id f831b3bd3d6b013893be7645df3a9cd05289c415 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use RtlEqualUnicodeString() instead of strcmpiW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 4d93bafe961ed53488ff0fb4b44cb1ad085531fe by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Avoid using memchrW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 186f189107972b739311f95a4ba3833838349b32 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Avoid using atoiW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8f3d869d784753d814a3493d01c3650f45389eda by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Avoid using sprintfW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id eb1b2e548656dc3d08cbf3c35454621491b84126 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use wcscpy() instead of strcpyW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 18411a19b4ea3a68234980c56d4c252670dfc000 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use wcscat() instead of strcatW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 80005ee016aeed42967adfe5b3042803d008c50d by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use wcschr() instead of strchrW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6de0ab276b3b79db4331993316f529a43f67c29a by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use wcsrchr() instead of strrchrW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 285c5490a4c0ee4a92d042a3e6ab32e6bc14fb49 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use wcslen() instead of strlenW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e003b9884edcccc417d41d30073b312648741aaa by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use wcscmp() instead of strcmpW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 4501ab0a7c80e31e602c540a446809e8ae3ebade by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use wcsncmp() instead of strncmpW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id e36b97e1d0644f90606d27f5104bb09a910540d2 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Make the windows directory a global variable.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id ca13f489e18fb1f7944e3bdcfdfc4a810bf80994 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Use single field for misc flags in ComClass redirection section.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 72d055854b59db9059a3465f1e65247c0cc5e94e by Nikolay Sivov <nsivov@codeweavers.com>
* [WINESYNC] ntdll: Create class section for proxy-stub interface entries.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id dd9295b415345f2b686b65bd05fae0320cf6dc39 by Nikolay Sivov <nsivov@codeweavers.com>
* [WINESYNC] ntdll: Use the standard C library names for the printf functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 4478ba258e45559ac97353ab27951e84dd9865c1 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Implement RtlActivateActivationContextEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id c71da19d24a5d6f01e65b3b3691a9d7dd17a2278 by Alexandre Julliard <julliard@winehq.org>
* [WINESYNC] ntdll: Fix a memory leak (Valgrind).
Signed-off-by: Chao Long <longchao@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id d0946955ec21e4da57aaec92459f81f131b27a49 by Chao Long <longchao@uniontech.com>
* [WINESYNC] rtl is now in sync with wine-staging wine-5.18
---------
Co-authored-by: winesync <ros-dev@reactos.org>
Co-authored-by: winesync <rosdev@reactos.org>
CORE-18196
With most code copied from Thomas Faber's PR #4915 as follows:
[RTL] Correctly initialize segments larger than MAXUSHORT.
GuardEntry->PreviousSize would overflow in this case.
RtlpInsertFreeBlock already handles this correctly by creating multiple free entries.
So we just let it return the last entry and use that for the PreviousSize.
This does not include all of the ASSERT's in PR #4915.
Move SRW and condition variable definitions out of kernel32_vista and into the NDK.
Essentially grabbed from PR #1190
Trying to reduce diff needed for Rtl/ntdll sync.
and sync SAL2 annotations.
It didn't always warn in the past, our gutfeeling (we have *not* double-checked that thesis!) is that the warnings might have been triggered when 0.4.15-dev-958-g 237aa3a9c1 was committed
Implement volume level changing for Aux/MidiOut/WaveOut devices. It's represented the following WINMM functions:
- auxGetVolume,
- auxSetVolume,
- midiOutGetVolume,
- midiOutSetVolume,
- waveOutGetVolume,
- waveOutSetVolume,
which are calling the followind messages appropriately:
- AUXDM_GETVOLUME,
- AUXDM_SETVOLUME,
- MODM_GETVOLUME,
- MODM_SETVOLUME,
- WODM_GETVOLUME,
- WODM_SETVOLUME.
This fixes volume control for several 3rd-party programs (like Fox Audio Player 0.10.2 from Rapps, Winamp 2.95 with WaveOut plugin). However it does not fix changing the volume in system volume mixers (SndVol32, MMSys), since they are using their own functionality instead. They technically do the same things, but apart from the functions mentioned above.
CORE-14780
Implement GetWavePosition API for both Legacy and MMixer modes.
[WDMAUD.DRV]
- Fix wrong I/O control code passed to DeviceIoControl for Legacy mode. Use IOCTL_GETPOS instead of IOCTL_OPEN_WDMAUD, to use the correct routine.
- Implement WdmAudGetWavePosition for MMixer mode, as it was completely unimplemented there. Call an appropiate MMixer routine and return back resulting wave position.
[WDMAUD]
- Implement WdmAudGetPostion routine, which is used by Legacy mode, and call the same MMixer routine from it too.
- Handle it in IOCTL_GETPOS I/O control request of dispatch routine.
[MMIXER]
- Implement MMixerGetWavePosition internal routine, which is called by both Legacy and MMixer modes, and does the actual work of retrieving playback position.
- Call an apporpriate KSPROPERTY_AUDIO_POSITION property from it, and return in the output resulting KSAUDIO_POSITION.PlayOffset member, which contains the current playback position offset, to be returned to the caller.
This fixes a failure retreiving the current audio playback position snd subsequent playing the audio data by several 3rd-party applications which are using this API (for example, some Gecko based browsers by @roytam1: Basilisk (Serpent) 52.9.0 IA-32 build, NewMoon 28.10.7 IA-32 build and KMeleon 76.5.3 Goanna engine).
CORE-19542
The change is needed, because the previous version emitted multiple ".seh_handlerdata" blocks and GAS isn't able to merge them into one, but will instead only include the first one. This is fixed by generating "asm defines" in the code and pass the line number to the "REACTOS seh" pragma, which is then used to create all handler data by referring to the predefined symbols, that include the line number.
Also the EstablisherFrame parameter passed to the filter/finally function is the original stack pointer, not the frame pointer! Take this into account by passing __builtin_frame_address(0) from the filter context to the global wrapper function, which includes the frame-offset, and use that to recalculate the frame-pointer from the passed in stack pointer.
The changes are:
- Do not allocate an additional WCHAR for the terminating UNICODE_NULL, since we already have that accounted for by sizeof(manifest_dirW)
- Use strcpyW intead of memcpy / strlenW, which does the same thing
- Add a define for user_shared_data
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.
* [MSVCRTEX] Only include _CrtDbgReport*, if we don't already export them
For some reason clang builds now want the ___chkstk_ms on x64 as well, so add it.