Commit graph

2539 commits

Author SHA1 Message Date
Timo Kreuzer 15fbcc19b9 [NTOS:KE/x64] Fix KiConvertToGuiThread
- Do not allocate a new stack, if the thread already has a large one. This prevents the function from freeing a large stack as a normal stack and subsequently leaking system PTEs.
- Fix the check for failure of PsConvertToGuiThread (test eax, not rax, for being negative, because by default rax is zero extended from eax, not sign extended). This fixes an infinite loop on failure.
2023-05-16 22:03:13 +03:00
Katayama Hirofumi MZ 4aff629302
[IMM32][NTUSER][SDK] Add ImmCallImeConsoleIME (#5271)
- Add <jpnvkeys.h>.
- Add imm32!ImmCallImeConsoleIME.
CORE-11700
2023-05-10 14:04:01 +09:00
Katayama Hirofumi MZ 8b948ff062
[KERNEL32][SDK] RegisterConsoleIME and UnregisterConsoleIME (#5270)
The conime.exe program exists in WinXP/Win2k3 and it realizes Console IME. conime.exe calls kernel32!RegisterConsoleIME and kernel32!UnregisterConsoleIME. To realize Console IME, these two functions are required. CORE-11700
2023-05-07 22:55:46 +09:00
Justin Miller f2a58733e8
[FREELDR][SDK] Build UEFI bootloader for ARM32 (#5196)
CORE-17604

- Disable some functions for ARM32;
- Remove some link options not used on ARM;
- Add get _controlfp() to LIBCNTPR to link properly on ARM;
- Unify Freeldr UI Drawing on ARM;
- Add qemu UART debugging for ARM32/ARM64.
2023-05-03 20:56:06 +02:00
Mark Jansen 507aae4c30
[ATL] Take _ATL_FREE_THREADED into account
When it is not defined, COM should not be initialize multithreaded
2023-04-27 16:29:21 +02:00
Mark Jansen 08d808cc44
[ATL] Add CAtlList::SwapElements 2023-04-26 22:48:29 +02:00
Mark Jansen d12880829f
[ATL] Add OBJECT_ENTRY_AUTO for simpler com object registration
Of course gcc needs a nasty hack to include the symbol.
CORE-18936
2023-04-22 21:23:55 +02:00
Mark Jansen bf29d98a54
[PSDK] Add some more argument names 2023-04-22 18:31:49 +02:00
Mark Jansen 9c8580a1e0
[ATL] Add CString::AppendFormat 2023-04-17 18:09:34 +02:00
Adam Słaboń 7d71456144 [MKISOFS] Fix MSVC build on ARM hosts
Check also for MSVC target machine macros on ARM
2023-04-16 18:53:54 +02:00
Timo Kreuzer 93dface84e [PSEH] Change return type of filter function prototype to avoid broken return from inside it. 2023-04-14 11:56:08 +03:00
Joachim Henze 99e5f51d5b
[SDK] Shorten autogenerated Copyright strings (#5210)
that we do compile into almost every dll and exe.
Reduces unnecessary scrolling in the
Versions tab of file properties dlg, which precedes the Copyright phrase anyway.

MS also uses shorter strings and therefore doesn't require to scroll at all.
See attached screenshots in the PR.
2023-04-04 12:10:59 +02:00
Katayama Hirofumi MZ 29e147beca
[MSPAINT][ATL] Encapsulation: mainWindow (#5178)
- Add DoCreate methods to CFullscreenWindow, CMiniatureWindow, and CMainWindow classes.
- Do encapsulation around mainWindow and _tWinMain.
- Add GetOpenFileName, GetSaveFileName, and ChooseColor helper methods to CMainWindow class.
- Move some code in WinMain into CMainWindow::OnCreate.
- Delay creation of CFullscreenWindow and CMiniatureWindow.
- Extend ATL CImage class as CImageDx in newly-created atlimagedx.h of mspaint.
CORE-18867
2023-03-28 22:31:26 +09:00
Dmitry Borisov 557306f5c0
[DDK:NDIS] Fix definition of broadcast address macro (#5155)
ff:ff:ff:ff:ff:ff is the broadcast MAC address.

CORE-8724
2023-03-18 16:57:52 +01:00
Hermès Bélusca-Maïto f6c8155239
[SDK] driverspecs.h: Add missing dummy _IRQL_limited_to_() definition (when _PREFAST_ is not defined).
Addendum to commit 8a688204.
2023-03-18 03:42:26 +01:00
Hermès Bélusca-Maïto e241c87eea
[SDK] sdkddkver.h: Add NTDDI_* defines for newest Windows 10 and 11 versions.
And add version descriptions, especially for Windows 10 as it becomes messy.

Information from:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlisntddiversionavailable
- Shared/sdk/extdef.h from https://github.com/Mattiwatti/WinObjEx64
- Descriptions from https://github.com/MiroKaku/Veil
- Cross-checked with headers from https://github.com/microsoft/wil
2023-03-14 00:14:12 +01:00
Hermès Bélusca-Maïto a8b09eddc4
[NTOS:KD] Add some annotations. 2023-03-09 18:32:36 +01:00
Mark Jansen 5bc045c041
[SDK:SCRNSAVE] Implement mouse move threshold.
This makes it easier to start the screensavers by double-clicking.
2023-03-08 20:19:19 +01:00
Katayama Hirofumi MZ fdedc549d0 [MSVCRT] Follow-up of Follow-up of #5032 (f172503)
Fix for system/_wsystem.
Use _set_errno(ENOMEM) for malloc failure.
Rename status variable as exit_code.
2023-03-05 23:28:00 +09:00
Katayama Hirofumi MZ 5a7dbd6064 [MSVCRT] Follow-up of #5032 (f172503)
Use _cwait() instead of WaitForSingleObject and GetExitCodeProcess.
Use malloc/free instead of LocalAlloc/LocalFree.
2023-03-05 23:20:12 +09:00
Katayama Hirofumi MZ f172503d57
[MSVCRT][CRT_APITEST] Implement _wsystem (#5032)
Implement _wsystem(), by referring system().
Improve system().
Use WaitForSingleObject in system() and _wsystem().
Check existence of COMSPEC.
Thanks ChatGPT.
2023-03-05 21:01:14 +09:00
Joachim Henze 0fb580a855
[SDK] Improve gen_baseaddress.py and its output files (#4964)
* [SDK:TOOLS] Improve gen_baseaddress.py

Adds some kbd layout modules into the excludes-section:
that we do lack for todays master: e.g._ kbdeo, kbdsf, kbdrost

and also some that we lacked in the past
(for improving backwards compatibility of the script to older rls-branches):
kbdgm, kbdes, kbdgrist, kbdja, kbdko, kbdsk, kbdsk1

* [SDK:CMAKE] Highlight in the output files where the script does misbehave
2023-03-04 11:45:06 +01:00
Mark Jansen 647f74d4ab
[ATL] Remove some code that doesn't exist in the native ATL 2023-02-20 19:32:59 +01:00
Katayama Hirofumi MZ 38c0da9978
[CRT] printf/wprintf: Support %zu (#5056)
"%zu" is a printf format specifier for type size_t. Some apps assume the implementation of this specifier. CORE-17787
2023-02-14 20:54:53 +09:00
Joachim Henze 09dde2cff9
[REACTOS] "http://www.reactos" -> "https://reactos" (#5043)
To harmonize, to save some bytes, and last but not least for security reasons.
This can be understood as an addendum to (#2619).
2023-02-06 17:01:52 +03:00
Timo Kreuzer 9d19f8bf65 [WINESYNC] msvcrt: Use memmove to copy memory in memcpy_s.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 055ca5e4d9770d4f14e3c157f1288fa6308b86dd by Jacek Caban <jacek@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 6b8a981010 [WINESYNC] msvcrt: Use memmove to copy memory in wmemcpy_s.
Fixes memory corruption in Outlook 2016.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id be56a83fd00cdaf9583a973b1e041f47c5277768 by Jacek Caban <jacek@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer c50fb470b4 [WINESYNC] msvcrt: Add DECLSPEC_HOTPATCH to functions patched by libtcmalloc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45199
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b917cc66f4f7b786e7f19f63ab0c0819a5455222 by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 3ff17d5d71 [WINESYNC] msvcrt: Don't include MSVC 8.0+ heap functions in SOs for older DLLs.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 42ab0af66b74f7572db2f6d0256f49fae7527221 by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 8fdc1b0d38 [WINESYNC] msvcrt: Add helper for exception throwing.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 90307e067f985f5963b62829993b320537578333 by Piotr Caban <piotr@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 6360937cd4 [WINESYNC] ucrtbase: Implement _realloc_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 8a69c5d81f8deb472df18a8e16e57efef2eb9a9a by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer aa77776eb0 [WINESYNC] ucrtbase: Implement _free_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id e4b8bc0edc640b36f2a2a26c53e18edea04fa74c by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 7757ebfbad [WINESYNC] ucrtbase: Implement _malloc_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 5325b8c95112be75f4fa0e2e2e45bcc88434fb5d by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 0dfd5665c0 [WINESYNC] ucrtbase: Implement _calloc_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id fdc57d497bb305e90680c3b450fa172042fd79cd by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 1d6ec8555d [WINESYNC] msvcrt: Handle overflow in calloc().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 50dd4b892825c75db35cd1f378291b51fa782f3e by Nikolay Sivov <nsivov@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 977e236102 [WINESYNC] msvcrt: memmove_s shouldn't zero its output buffer on error.
wine commit id 49560458426cf25b6a36bbf9bad35aa75c9f7aa7 by Dan Kegel <dank@kegel.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 8fa0886fb9 [CRT] Reduce diff to wine by adjusting white space 2023-02-02 14:58:08 +01:00
Gabriel Grondin 144e984b40 [ZLIB] Update to v1.2.13. CORE-18752 2023-02-02 02:18:39 +03:00
Victor Perevertkin 1734f29721 [IP][LWIP][TCPIP] Move ip and lwip libraries to drivers/network/tcpip
These libraries are used only inside tcpip.sys driver so move them close
to it.
2023-02-01 02:31:14 +03:00
Victor Perevertkin 886670e914
[DRIVERS] Remove unused __NTDRIVER__ and KERNEL definitions 2023-01-31 20:18:18 +03:00
Timo Kreuzer f34e425e1a [WINESYNC] msvcrt: Don't fail when _aligned_offset_malloc is used with size=0.
wine commit id 7771552f247660acc472b4862f32c4f8426be180 by Piotr Caban <piotr@codeweavers.com>
2023-01-24 18:53:13 +01:00
Timo Kreuzer 739c9a1e77 [WINESYNC] msvcrt: Fixed strncpy_s behavior when count equals 0.
wine commit id bdf9a9f9bd56354f70a7431a9682183b84353211 by Piotr Caban <piotr@codeweavers.com>
2023-01-24 18:53:13 +01:00
Timo Kreuzer c36ea58f32 [CRT] Add a number of functions from wine
This adds _aligned_msize, _recalloc, wmemmove_s, memcpy_s, wmemcpy_s
2023-01-24 18:53:13 +01:00
Timo Kreuzer d0a52a6d71 [CRT] Reduce diff
- use msvcrt_set_errno
- MSVCRT_CHECK_PMT already sets the error.
- NULL check is already in HeapFree
2023-01-24 18:53:13 +01:00
Timo Kreuzer c47506a5f4 [CRT] Use the original wine heap functions 2023-01-24 18:53:13 +01:00
Timo Kreuzer cf40758d76 [CRT] reduce diff to wine of heap code
No functional changes intended.
2023-01-24 18:53:13 +01:00
Timo Kreuzer 73ef1c3c8b [CRT] Get back MSVCRT prefix in wine heap code 2023-01-24 18:53:13 +01:00
Ratin Gao 21a168e574
[ATL] CImage::Load(): Return E_FAIL without ATLASSERT on failure (#4993)
Application won't be interrupted by ATLASSERT when image load failure happens,
just like it was done in MS ATL.

CORE-18589
2023-01-22 20:38:16 +03:00
Hermès Bélusca-Maïto 1b25fe161c
[KERNEL32][NTOS:PS][RTL] Cleanup some DbgPrompt() calls. 2023-01-06 14:44:49 +01:00
Hermès Bélusca-Maïto 2714e3ee48
[LIBWINE] Fix GCC build warning. (#4938)
In file included from ../sdk/lib/3rdparty/libwine/debug_ros.c:9:
../sdk/lib/3rdparty/libwine/debug.c: In function 'get_temp_buffer':
../sdk/lib/3rdparty/libwine/debug.c:343:33: warning: passing argument 1 of '_InterlockedExchangeAdd' from incompatible pointer type [-Wincompatible-pointer-types]
     idx = interlocked_xchg_add( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
                                 ^~~~
In file included from ../sdk/include/crt/mingw32/intrin.h:98,
                 from ../sdk/include/crt/intrin.h:1017,
                 from sdk/include/psdk/winnt.h:48,
                 from ../sdk/include/psdk/windef.h:202,
                 from ../sdk/include/reactos/wine/debug.h:26,
                 from ../sdk/lib/3rdparty/libwine/debug.c:32,
                 from ../sdk/lib/3rdparty/libwine/debug_ros.c:9:
../sdk/include/crt/mingw32/intrin_x86.h:215:70: note: expected 'volatile long int *' but argument is of type 'int *'
 __INTRIN_INLINE long __cdecl _InterlockedExchangeAdd(volatile long * Addend, long Value)
                                                      ~~~~~~~~~~~~~~~~^~~~~~
2023-01-06 13:17:21 +01:00