Commit Graph

3995 Commits

Author SHA1 Message Date
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