Commit graph

4206 commits

Author SHA1 Message Date
Rémi Bernon ff864e5621 ntdll: Implement RtlSetUserValueHeap.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-09 20:55:20 +02:00
Rémi Bernon 31df70a3de ntdll: Add block padding when HEAP_ADD_USER_INFO flag is set.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-09 20:55:20 +02:00
Alexandre Julliard 5dee0ed755 kernelbase: Add NORM_IGNORENONSPACE support in LCMapStringEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36720
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-08 15:02:30 +02:00
Alexandre Julliard 1e52895ef7 kernelbase: Implement IsNLSDefinedString().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-07 16:57:26 +02:00
Alexandre Julliard d2c225524f kernel32/tests: Add tests for high Unicode planes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-06 14:40:34 +02:00
Nikolay Sivov 3dcb85f56d kernelbase/tests: Move VirtualAllocFromApp() tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-06 12:16:33 +02:00
Rémi Bernon deaf0891b0 ntdll: Improve block size rounding compatibility.
This also increase the default heap size to 2MiB (32bit) / 4MiB (64bit),
for the tests to pass.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-02 17:24:51 +02:00
Alexandre Julliard 86941c44d9 kernelbase: Add a helper function to map an entire buffer to half width.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-02 10:10:44 +02:00
Alexandre Julliard cd44979ce1 kernelbase: Add a helper function to map an entire buffer to full width.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-02 09:56:48 +02:00
Alexandre Julliard c2a455a20d kernelbase: Fix checks for valid locale in LCMapStringW/Ex.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-01 12:46:40 +02:00
Rémi Bernon 526fc34a39 ntdll: Remove tail checking on large blocks.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-05-31 22:51:34 +02:00
Alexandre Julliard e613d29450 kernelbase: Reimplement FindNLSStringEx/W using the sortkey generation code.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-30 22:40:23 +02:00
Alexandre Julliard d8c973ad95 kernelbase: Reimplement CompareStringEx using the sortkey generation code.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-30 22:39:29 +02:00
Alexandre Julliard d8bea38f96 kernel32/tests: Add an option to generate sortkeys from an input file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-30 22:07:42 +02:00
Alexandre Julliard 2756fec551 kernel32/tests: Add a few more sortkey tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-30 22:07:40 +02:00
Fabian Maurer 64ba1b3245 kernel32/tests: Add a number of Unicode collation tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-30 22:07:21 +02:00
Nikolay Sivov d9c4974c9c kernel32/tests: Run process information tests over defined test data.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-25 18:25:43 +02:00
Alexandre Julliard aad201c731 kernel32/tests: Pass a locale instead of a codepage to CompareStringA/W.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-24 18:21:56 +02:00
Brendan Shanks 509877743e kernelbase: Add RaiseFailFastException stub.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-23 20:54:46 +02:00
Rémi Bernon f7a4ca4446 kernel32/tests: Workaround (Local|Global|Heap)Free warnings.
Using function pointers to remove the malloc attributes.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-05-23 18:58:23 +02:00
Alexandre Julliard 5a5ae1a0c2 kernel32/tests: Don't use strcmp() to compare sortkeys.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-23 17:22:45 +02:00
Nikolay Sivov 15aa8c6fb8 kernelbase: Add SetThreadInformation().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52956
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-20 14:36:44 +02:00
Rémi Bernon 0f9ad11a27 kernel32/tests: Mark activatableClass wrong xmlns test as broken on w1064v1909.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-20 12:24:38 +02:00
Nikolay Sivov 116c718a53 kernel32/tests: Extend VirtualAllocEx() tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-20 11:37:20 +02:00
Fabian Maurer f391e9cf1e kernel32: Prevent null pointer dereference in WritePrivateProfileStructW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49285
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-18 18:37:30 +02:00
Rémi Bernon 3728b2b7d2 ntdll: Fail to allocate large blocks if heap isn't growable.
This tweaks the test sizes so that it passes on Wine too. The created
heap should be large enough to hold the requested alloc size, but the
allocation still fails.

Windows seems to have a specific lower threshold for large blocks with
non growable heaps, but it's probably not very useful to match it.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-18 18:28:59 +02:00
Rémi Bernon 074177b8b0 ntdll: Rewrite RtlWalkHeap and enumerate large blocks.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-13 22:11:41 +02:00
Rémi Bernon e2258ef559 ntdll: Split RtlFreeHeap to a separate heap_free helper.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-12 12:50:18 +02:00
Rémi Bernon dadb1fa72f ntdll: Split RtlAllocateHeap to a separate heap_allocate helper.
Factoring out locking and status handling.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-12 12:50:18 +02:00
Nikolay Sivov 1e2bc2f50e kernel32: Implement UnmapViewOfFileEx().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-06 19:17:01 +02:00
Francois Gouget 5479e9f276 kernel32/tests: Fix a typo in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-06 19:16:35 +02:00
Rémi Bernon d823e344c8 kernel32/tests: Add some RtlWalkHeap and more HeapWalk tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 18:33:28 +02:00
Rémi Bernon dac05029bd kernel32/tests: Add more block layout tests with alloc flags.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 18:33:28 +02:00
Rémi Bernon 00c64fcb01 ntdll: Ignore HEAP_(TAIL|FREE)_CHECKING_ENABLED flags in RtlCreateHeap.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 18:33:28 +02:00
Rémi Bernon a21c93cde6 kernel32/tests: Check that HeapCreate should ignore checking flags.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 18:33:28 +02:00
Rémi Bernon 1f490ec1a5 ntdll: Respect HEAP_NO_SERIALIZE flag in HeapLock / HeapUnlock.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 18:33:28 +02:00
Rémi Bernon 2e47e23df1 kernel32/tests: Add some HEAP_NO_SERIALIZE flag / LFH locking tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 18:33:28 +02:00
Rémi Bernon f555b1b3bb kernel32/tests: Reduce layout tests verbosity by skipping some sizes.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 18:33:28 +02:00
Alexandre Julliard dc37b66d17 kernelbase: Reimplement GetTimeFormatA().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 08:56:25 +02:00
Alexandre Julliard fc26407e8e kernelbase: Reimplement GetDateFormatA().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 08:55:45 +02:00
Alexandre Julliard 1b127e24dc kernelbase: Reimplement GetTimeFormatW/Ex() using get_locale_info().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 08:55:19 +02:00
Alexandre Julliard 6ccdd7f8f5 kernelbase: Reimplement GetDateFormatW/Ex() using get_locale_info().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 08:51:43 +02:00
Alexandre Julliard 9afc20949a kernelbase: Reimplement GetCurrencyFormatW/Ex() using get_locale_info().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 12:26:28 +02:00
Alexandre Julliard 56099a3124 kernelbase: Reimplement GetNumberFormatW/Ex() using get_locale_info().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 12:26:28 +02:00
Alexandre Julliard 42afb693b1 kernel32: Reimplement GetCurrencyFormatA().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 12:26:28 +02:00
Alexandre Julliard b6bf69ef80 kernel32: Reimplement GetNumberFormatA().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 12:26:28 +02:00
Francois Gouget 871692e259 kernel32/tests: Fix a copy/paste error in an ok() message.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-02 22:43:53 +02:00
Alexandre Julliard ea1eae646d kernelbase: Implement ResolveLocaleName().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-02 14:12:10 +02:00
Paul Gofman e015409e74 kernel32/tests: Add a broken last error result in test_CopyFileW().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52858
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 17:24:57 +02:00
Francois Gouget c6c3cdc697 kernel32/tests: Fix the spelling of a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 17:24:02 +02:00
Francois Gouget 84bce45eba kernel32/tests: Remove a couple of unnecessary NULL casts.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 17:23:30 +02:00
Alexandre Julliard f68cccc825 kernel32/tests: Mark a failing test as broken.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52861
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 16:14:20 +02:00
Rémi Bernon 39153c9851 kernel32/tests: Add some RtlGetUserInfoHeap tests.
And corresponding RtlSetUserValueHeap and RtlSetUserFlagsHeap tests.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 12:27:11 +02:00
Rémi Bernon 3757a8f1ab kernel32/tests: Add some heap block layout tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 12:26:36 +02:00
Alex Henrie 8a5d8d6cf9 kernel32: Fix percentage calculation in GetSystemPowerStatus.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-22 13:20:37 +02:00
Eric Pouech 56056f39d9 kernel32/tests: Adapt duplicate console handle test to non-Win7 handles.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-22 13:06:19 +02:00
Eric Pouech fdfd19cb47 kernel32/tests: Make the console tests pass if current console is shell-no-window.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-22 13:06:19 +02:00
Rémi Bernon 43fe980818 ntdll: Fix main heap struct layout and flags members.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-19 21:41:49 +02:00
Rémi Bernon eb087788db kernel32/tests: Reduce the number of GlobalAlloc size tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-19 21:41:42 +02:00
Rémi Bernon af6dd8eb0c kernel32/tests: Tweak tests results for w7pro64.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-19 21:41:39 +02:00
Zhiyi Zhang 596b647391 kernel32/tests: Add more CreateActCtx() tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 18:15:48 +02:00
Rémi Bernon 29fe143544 kernel32/tests: Add some HeapWalk tests for the LFH frontend.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 11:09:04 +02:00
Rémi Bernon 98066b5a8e kernel32/tests: Cleanup and add Heap(Query|Set)Information tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 11:08:59 +02:00
Rémi Bernon 0237d1702f kernel32/tests: Add some HeapWalk tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 11:07:34 +02:00
Rémi Bernon 13a4da538c kernel32/tests: Add some GetProcessHeaps tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 11:07:25 +02:00
Rémi Bernon 93d5aba89c kernel32/tests: Add invalid pointer heap validation tests.
Adding commented-out crashing tests to make it obvious that they were
tested and that HeapFree or HeapReAlloc don't validate pointers.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 11:05:24 +02:00
Jacek Caban b4d91adb16 kernelbase: Add support for CREATE_NO_WINDOW flag in CreateProcess.
Based on patches by Eric Pouech and Torge Matthies.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 21:39:42 +02:00
Eric Pouech 313b10991b kernel32/tests: Add more CreateProcess console management tests.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 21:39:42 +02:00
Zhiyi Zhang 9eff8911c3 kernel32/tests: Check against INVALID_HANDLE_VALUE for CreateActCtxW() return values.
CreateActCtxW() returns INVALID_HANDLE_VALUE on error.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 21:39:42 +02:00
Paul Gofman 02faaea93b kernelbase: Reset last error on success in CopyFileExW().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 21:15:56 +02:00
Alexandre Julliard 1790546d03 kernelbase: Support UTF-8 as default Ansi codepage in WideCharToMultiByte().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 17:34:48 +02:00
Alexandre Julliard 8993e15cfa kernelbase: Support UTF-7/8 codepages in get_codepage_table().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 17:34:48 +02:00
Rémi Bernon 5b4009e8c2 kernel32/tests: Cleanup heap pointer alignment tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 23:06:16 +02:00
Rémi Bernon 8eb9cbd6e7 kernel32/tests: Cleanup heap allocation functions tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 23:06:13 +02:00
Rémi Bernon 60e0ae2f4c kernel32/tests: Load all test function pointers on init.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 23:06:02 +02:00
Alexandre Julliard 4d68497fac kernelbase: Reimplement Internal_EnumDateFormats() using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Alexandre Julliard 25595a0abe kernelbase: Reimplement Internal_EnumTimeFormats() using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Alexandre Julliard 8576c3e131 kernelbase: Reimplement Internal_EnumCalendarInfo() using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Alexandre Julliard 6517f6c239 kernelbase: Implement NlsValidateLocale().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Alexandre Julliard 812ebc67a4 kernelbase: Fix IsValidLocale() and GetLocaleInfo() with special LOCALE_* identifiers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Rémi Bernon c944f64166 ntdll: Support activatableClass activation context elements.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-06 23:07:20 +02:00
Rémi Bernon c7f72cc400 kernel32/tests: Add some activatableClass manifest attribute tests.
And the matching ACTIVATION_CONTEXT_SECTION_WINRT_ACTIVATABLE_CLASSES
activation context section.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-06 23:07:20 +02:00
Alexandre Julliard 80445efa90 kernel32: Simplify Get/SetCalendarInfoA() implementation.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-06 10:45:01 +02:00
Alexandre Julliard bf83236b2f kernel32: Simplify GetGeoInfoA() implementation.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-06 10:16:36 +02:00
Rémi Bernon f411193781 kernel32/tests: Cleanup and add more heap layout tests.
Updating the tests to check the new, post-vista, layout.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-05 17:55:31 +02:00
Rémi Bernon 727a162fc6 kernel32/tests: Add broken results for GlobalMemoryStatus test.
As seen on win81_cw-gtx560-32 and win81_cw-rx460-32.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-05 17:55:29 +02:00
Alexandre Julliard a074d0c3a8 kernelbase: Reimplement GetCalendarInfoEx/W using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-05 16:59:09 +02:00
Rémi Bernon dee510bd32 kernelbase: Use the same HLOCAL flags / lock layout as native.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-04 18:40:26 +02:00
Rémi Bernon 2fcb072f03 kernelbase: Use the same HLOCAL entry pointer alignment as native.
This changes the GlobalUnlock todo_wine as we previously considered the
invalid mem handle as a valid pointer, and we now instead check handle
validity.

Returning TRUE in for an invalid handle doesn't seem very important, and
a corner case, and it breaks compatibility and imm32 tests.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-04 18:40:26 +02:00
Rémi Bernon 3c9d2cbaea kernelbase: Allocate HLOCAL / HGLOBAL from a static handle table.
Sharing the table pointers through KernelBaseGetGlobalData to check for
handle validity in kernel32, and as native does it.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 22:02:51 +02:00
Rémi Bernon 981283a50b kernelbase: Implement internal KernelBaseGetGlobalData.
And call it from kernel32 to get access to kernelbase global data.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 22:02:51 +02:00
Rémi Bernon 1ff9e76395 kernel32: Synchronize the HLOCAL helpers with kernelbase.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 22:02:51 +02:00
Alexandre Julliard 2366d19b45 kernel32: Remove the old locale information stored in resources.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 11:02:37 +02:00
Alexandre Julliard 689e63485c kernel32: Move the error message table to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 10:57:07 +02:00
Alexandre Julliard 6d06171485 kernel32: Move the language group resources to kernelbase.
And enable translating them through the po files.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-31 10:57:07 +02:00
Alexandre Julliard 78a33f9684 kernelbase: Reimplement SetLocaleInfoW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-30 11:03:37 +02:00
Rémi Bernon fc12f812c3 kernel32: Make Global* traces and identifiers more consistent.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:53:50 +02:00
Rémi Bernon 48ebc410ef kernel32: Fix indentation of Global* functions.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 20:53:50 +02:00
Rémi Bernon d31be111aa kernel32/tests: Add some HGLOBAL/HLOCAL entry layout tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:24:37 +02:00
Rémi Bernon d32bc81ea4 kernel32/tests: Add some HGLOBAL/HLOCAL limits tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:24:31 +02:00
Rémi Bernon 1f472e905c kernel32/tests: Clean LocalAlloc tests and move them together.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:24:22 +02:00
Rémi Bernon 60805ce139 kernel32/tests: Clean GlobalAlloc tests and move them together.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:24:17 +02:00
Rémi Bernon b4b097512f kernel32/tests: Use 0xdeadbeef directly instead of a custom define.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:24:11 +02:00
Dmitry Timoshkov edb5762b55 kernel32/tests: Add a test to show that services.exe is supposed to run in the session 0.
IsWindowsService() from Microsoft.Extensions.Hosting.WindowsServices (.Net 4.6, 4.8, 5.0)
depends on this.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:22:45 +02:00
Rémi Bernon 4d122a26e5 kernel32/tests: Remove GlobalMemoryStatus loop and relax the checks.
The test is a bit too strict in some case on Windows, relaxing it like
it was initially is probably fine now that the counters are correct.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 22:21:47 +02:00
Alexandre Julliard 412e79181f kernelbase: Reimplement LCIDToLocaleName() using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-28 18:23:57 +02:00
Rémi Bernon bb17583239 kernelbase: Fix GlobalMemoryStatusEx counters.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-25 17:56:36 +01:00
Rémi Bernon cabfefb026 kernel32/tests: Merge GlobalMemoryStatus(Ex) tests together.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-25 17:56:32 +01:00
Rémi Bernon ff0114eb54 kernel32/tests: Add some GlobalMemoryStatusEx tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-25 17:56:18 +01:00
Rémi Bernon 1a1f471cc4 kernel32/tests: Use HeapAlloc function pointer to silent a warning.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-25 17:53:19 +01:00
Alexandre Julliard 1f70f72b29 kernelbase: Reimplement EnumUILanguages() using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 17:11:08 +01:00
Alexandre Julliard 273ab6c774 kernel32/tests: Fix codepage test for UTF-8 default codepage.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-23 18:42:13 +01:00
Alexandre Julliard b5561c8bba ntdll: Support UTF-8 codepage in RtlInitCodePageTable().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-23 18:42:13 +01:00
Alexandre Julliard a2d44e89ea ntdll: Implement RtlLcidToLocaleName().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 17:39:01 +01:00
Alexandre Julliard ea9a776d7d ntdll: Implement RtlIsValidLocaleName().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 17:39:01 +01:00
Alexandre Julliard b631c14702 ntdll: Reimplement RtlLocaleNameToLcid() using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 17:39:01 +01:00
Alexandre Julliard e195a9b0c3 kernel32/tests: Add tests for NtInitializeNlsFiles() and RtlGetLocaleFileMappingAddress().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-21 14:28:10 +01:00
Eric Pouech f034084d49 kernelbase: Handle corner case in CreateProcess.
In CreateProcess, if:
- parent isn't attached to a console
- CreateProcess's flag isn't set with DETACHED_PROCESS nor
  CREATE_NEW_CONSOLE
- child is a CUI program
then a console must be allocated for the child.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52048
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-17 21:06:10 +01:00
Eric Pouech 043a0ddf08 kernel32/tests: Add some console tests about creating cui vs gui processes.
Adding helper to copy argv[0] into an executable with CUI subsystem.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-17 21:06:10 +01:00
Daniel Lehman a5d14fa980 kernelbase: Check for invalid value in FileTimeToSystemTime.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-16 21:16:21 +01:00
Daniel Lehman a4a7ab8e3b kernel32/tests: Add test for FileTimeToSystemTime.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-16 21:16:21 +01:00
Eric Pouech 0bf6066b2b kernel32/tests: Remove temporary defines for long types migration.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-10 18:27:43 +01:00
Eric Pouech 9ed10e4841 kernel32/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-09 19:11:43 +01:00
Eric Pouech c971429419 kernel32/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-09 19:11:43 +01:00
Eric Pouech b38d52cef4 kernel32/tests: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-09 19:11:43 +01:00
Eric Pouech c9631780d4 kernel32/tests/time: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-09 19:11:43 +01:00
Eric Pouech 04531cf6bb kernel32/tests/change: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-09 19:11:43 +01:00
Eric Pouech 0f43042543 kernel32/tests/volume: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-08 09:36:19 +01:00
Eric Pouech d87cc18889 kernel32/tests/virtual: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-08 09:36:12 +01:00
Eric Pouech 6f35ac32c0 kernel32/tests/thread: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-08 09:35:57 +01:00
Eric Pouech 9e945c8d1c kernel32/tests/sync: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-08 09:35:44 +01:00
Eric Pouech f588d96e95 kernel32/tests/profile: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-07 20:53:12 +01:00
Eric Pouech a9ae4866a5 kernel32/tests/process: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-07 20:53:12 +01:00
Eric Pouech c1cebdf19a kernel32/tests/pipe: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-07 20:53:12 +01:00
Eric Pouech 51005afca3 kernel32/tests/path: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-07 20:53:12 +01:00
Eric Pouech 65f36a9695 kernel32/tests/module: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-04 10:06:21 +01:00
Eric Pouech c56cf9dad2 kernel32/tests/locale: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-04 10:06:10 +01:00
Eric Pouech 1aaafa6a84 kernel32/tests/loader: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-04 10:06:05 +01:00
Eric Pouech 08fff6d9d5 kernel32/tests/heap: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-04 10:06:03 +01:00
Brendan Shanks 1b9d48a7b0 ntdll: Don't require equal Length and MaximumLength when setting ThreadNameInformation.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 21:32:49 +01:00
Brendan Shanks a9a294d286 kernel32/tests: Add additional Get/SetThreadDescription() tests.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 21:32:46 +01:00
Eric Pouech d3735faacf kernel32/tests/format_msg: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 10:51:30 +01:00
Eric Pouech 2fa9f891b1 kernel32/tests/file: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 10:51:30 +01:00
Eric Pouech edbfa7dd7c kernel32/tests/environ: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 10:51:30 +01:00
Eric Pouech 2bbae2cea3 kernel32/tests/debugger: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-03 10:51:30 +01:00
Eric Pouech 219ff69ae2 kernel32/tests/console: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-02 20:17:15 +01:00
Eric Pouech 3d873a7fc5 kernel32/tests/comm: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-02 20:17:15 +01:00
Eric Pouech 34227cb7e6 kernel32/tests/codepage: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-02 20:17:15 +01:00
Eric Pouech bc2df6820c kernel32/tests/actctx: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-02 20:17:15 +01:00
Paul Gofman 81e06c6136 kernel32: Import RtlRestoreContext() instead of forwarding.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-25 19:02:18 +01:00
Paul Gofman 40590b7a97 kernel32: Import RtlCaptureContext() instead of forwarding.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-25 19:02:18 +01:00
Alexandre Julliard 77973e7e72 kernelbase: Implement IsApiSetImplemented().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Alexandre Julliard cb2fb8c25e ntdll: Implement ApiSetQueryApiSetPresence/Ex().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Alexandre Julliard 7b233f3032 ntdll: Map explicitly loaded apiset dlls to their target library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Eric Pouech 912cdec76d kernel32/tests: Don't outdent todo_wine*.
This prevents -Wmisleading-indentation warnings (Mingw GCC11).

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 18:55:22 +01:00
Alexandre Julliard ac5ebb6192 kernel32/tests: Add tests for apiset query functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-18 22:10:47 +01:00
Alexandre Julliard 4a5a3ba702 kernel32: Move some more console functions to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-18 11:03:22 +01:00
Eric Pouech cb48c6dca4 kernel32/tests: Fully allocate SYSTEM_FIRMWARE_TABLE_INFORMATION.
This prevents a warning on mingw-gcc version 11 (-Warray-bounds).

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 22:16:03 +01:00
Alexandre Julliard 8796d34a80 kernel32/tests: Add a few more tests for apisets.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 22:16:03 +01:00
Roman Pišl 3a95a4a012 kernel32: Implement GetConsoleProcessList.
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 22:59:53 +01:00
Roman Pišl ac4dd0773f kernel32/tests: Add test for GetConsoleProcessList.
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 22:59:53 +01:00
Alexandre Julliard 97d8b860f4 kernel32: Forward SetThreadToken() to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-15 16:34:17 +01:00
Francois Gouget 0016df0fb1 kernel32/tests: Add a trailing linefeed to an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:42 +01:00
Eric Pouech a0fee49db2 kernel32: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 11:21:29 +01:00
Hugh McMaster 27df7f518c kernelbase: Implement SetCurrentConsoleFontEx.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 10:47:05 +01:00
Nikolay Sivov ed5126de11 kernel32: Add messages for some of the WSA error codes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-03 10:29:49 +01:00
Fabian Maurer d37028ae54 kernel32/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 21:09:19 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
André Zwing 34841c0148 kernel32: Fix GetCompressedFileSize[AW] spec file entries.
Signed-off-by: André Zwing <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-10 11:38:22 +01:00
Alex Henrie 566c0653f2 kernel32/tests: Drop change test workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-05 17:16:18 +01:00
Alex Henrie c43ce509d2 kernel32/tests: Drop path test workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-04 11:49:31 +01:00
Paul Gofman 8eacd3e507 server: Store PE image info in process structure.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51829
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-02 13:53:08 +01:00
André Zwing a6bf1a5ffb kernel32/tests: Don't test functions directly when reporting GetLastError().
Signed-off-by: André Zwing <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-29 13:43:25 +01:00
Alex Henrie 04097b4f92 kernel32/tests: Check return value of NtGetNlsSectionPtr in test_GetCPInfo (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-27 15:00:45 +01:00
Alex Henrie b7223aff36 kernel32/tests: Ensure auto_value.data is initialized in test_ExitCode (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-27 15:00:38 +01:00
Alex Henrie b3166ff31e kernel32/tests: Remove unused variable size from test_process_info (Coverity).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-27 15:00:08 +01:00
Eric Pouech 508e97a249 kernel32/tests: Test resetting ctrl-c handlers on some console APIs.
AllocConsole(), AttachConsole() and FreeConsole() should reset ctrl
handlers' list.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 22:56:59 +01:00
Paul Gofman aee405e2cb ntdll: Always try searching apiset DLLs in the default directories.
This is a temporary workaround until we have a correct apisets
implementation.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 10:55:30 +01:00
Keno Fischer d96975d649 kernel32: Fix CancelIoEx return value.
In commit 27ecc6ba5 ("ntdll: Fix iosb handling in NtCancelIoFile()"),
NtCancelIoFile(Ex) was updated to return its status rather than
unconditionally setting it in io_status->u.Status (though the write
was retained in the success case). As a result, in the error case,
the kernelbase wrappers now interpret unitialized memory as an error
code, since io_status->u.Status is never written.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 10:50:10 +01:00
Alexandre Julliard 3f80ea69fb kernel32/tests: Remove an unreliable test.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 18:15:52 +01:00
Alexandre Julliard 1431702f5a kernel32/tests: Fix some test failures on Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 18:15:35 +01:00
Alex Henrie d7161a8576 kernel32/tests: Split up checks in flush_proc function.
This test is failing intermittently on the testbot but not enough
information is output to tell why.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-13 11:32:20 +01:00
Paul Gofman d2e35b04fb ntdll: Remove a special case for entry point not in executable section in map_image_into_view().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 22:14:44 +01:00
Francois Gouget 68dc3d4116 kernel32/tests: Check that the preferred UI languages are in uppercase.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 16:19:48 +01:00
Francois Gouget 652d94d34b kernel32: Store the ILANGUAGE values in uppercase.
Some APIs (e.g. GetSystemPreferredUILanguages()) return them as a string
so the case should match the one used by Windows in case developers used
case sensitive string comparisons (e.g. as in advapi32:lsa)

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 16:19:48 +01:00
Mohamad Al-Jaf a866e9150e kernelbase: Add CreateBoundaryDescriptorW stub.
Needed for IE11 iertutil.dll.

Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 16:19:48 +01:00
Alexandre Julliard 3c715f14c7 kernel32/tests: Use the correct scanf format for a handle.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52155
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-03 16:50:02 +01:00
Brendan Shanks e7afddd2c1 ntdll: Rename THREAD_DESCRIPTION_INFORMATION to THREAD_NAME_INFORMATION.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:40 +01:00
Brendan Shanks 65dd060a67 ntdll: Rename ThreadDescription to ThreadNameInformation.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:40 +01:00
Mohamad Al-Jaf 04d1cab16a kernelbase: Add SetCachedSigningLevel stub.
Needed for Microsoft Edge offline installer.

Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:39 +01:00
Jinoh Kang 9c5fa40ebd kernelbase: Fix infinite loop in Internal_EnumCalendarInfo.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52129
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Jinoh Kang 4010876a42 kernel32/tests: Add tests for EnumCalendarInfo(Ex).
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Paul Gofman db7cdf99b0 kernel32: Use uppercase ntdll name in forwarded exports.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 09:58:16 +01:00
Paul Gofman bf8b185b91 kernelbase: Add stub for PrefetchVirtualMemory().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 15:37:24 +01:00
Hugh McMaster 4b9010d538 kernelbase: Write NUL bytes to CPINFO.LeadByte for the CP_UTF7 and CP_UTF8 code pages.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:51 +01:00
Hugh McMaster 381ea5413c kernel32/tests: Test whether every element of the CPINFO.LeadByte array is NUL.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:51 +01:00
Nick Fox ef26f7bd5c ntdll: Fix LdrGetDllPath with LOAD_WITH_ALTERED_SEARCH_PATH without a path.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26350
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51821
Signed-off-by: Nick Fox <nick@foxsec.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:50 +01:00
Nick Fox 85723b9208 kernel32: Add tests for LdrGetDllPath with LOAD_WITH_ALTERED_SEARCH_PATH.
Signed-off-by: Nick Fox <nick@foxsec.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-22 22:20:50 +01:00
Hugh McMaster 4e351b47bf kernel32: Return font size, not screen buffer size, from GetCurrentConsoleFontEx.
GetCurrentConsoleFontEx currently returns the screen buffer size when
maxwindow is FALSE. It should return the current console font size.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 19:58:51 +01:00
Hugh McMaster e4f3d78776 kernel32/tests: Add tests for the current console font size.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-15 19:58:44 +01:00