Commit Graph

3974 Commits

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