Commit graph

3984 commits

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