Commit Graph

4631 Commits

Author SHA1 Message Date
Alexandre Julliard 44ce5d9283 unicode: Support fetching a zip containining the data files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-09 09:48:42 +01:00
Andrew Wesie 64d70b103d ntdll: Add NtQueryVirtualMemory(MemoryWorkingSetExInformation).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45667
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-07 13:25:37 +01:00
Dmitry Timoshkov bbd73667d7 ntdll: Split logic for MemoryBasicInformation into a separate function.
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-07 13:14:07 +01:00
Kevin Puetz b6e91fa44b ntdll: Allow NULL lpAssemblyDirectoryName in find_actctx_dll.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:32:00 +01:00
Rémi Bernon 544fd9504a ntdll: Process system APCs while the signals are blocked.
This makes sure that system APC, such as APC_BREAK_PROCESS do not get
interrupted in the middle of their execution, and that the APC
completion notification is always correctly sent back to the caller.

Otherwise DbgBreakProcess sometimes did not return until
WaitForDebugEvent/ContinueDebugEvent are called, because of a race
condition between the APC servicing thread, and the newly created
exception thread.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:26 +01:00
Rémi Bernon 2dc99bfb30 ntdll: Handle system APCs in a separate inner loop.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:24 +01:00
Rémi Bernon 3ffa355d2b ntdll: Use the status to tell user APC from system APC.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:21 +01:00
Rémi Bernon 6cb2336217 ntdll: Reorder code to make the select logic clearer.
The wait_select_reply call may return STATUS_USER_APC/STATUS_KERNEL_APC,
depending on which APC is about to be returned but the apc call will
always be APC_NONE right after the wait. It needs an additional select
request to actually return the call.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:18 +01:00
Rémi Bernon 676ad9b0af server: Use STATUS_KERNEL_APC to indicate system APCs.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:15 +01:00
Alexandre Julliard 6346809302 unicode: Move the combining class table to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:26 +01:00
Alexandre Julliard cd8eaef47e unicode: Avoid copying the decomposition data when not necessary.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:26 +01:00
Alexandre Julliard a7cc191aa8 ntdll: Fix estimated buffer sizes in RtlNormalizeString().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:03 +01:00
Alexandre Julliard dcd195e0f1 ntdll: Add parameter checking in RtlNormalizeString().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 19:20:39 +01:00
Alexandre Julliard cc300a20b3 libport: Move Unicode normalization implementation to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 19:20:39 +01:00
Zebediah Figura b41ab972ec ntdll: Support the %I format modifier.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:20:42 +01:00
Zebediah Figura 9c3dcdfb6c ntdll/tests: Add more tests for printf format specifiers.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:20:39 +01:00
Rémi Bernon d03420da12 ntdll: Don't change RtlWaitOnAddress size after user invoke_apc.
This makes the next iteration to immediately return STATUS_SUCCESS
because of compare_addr returning FALSE with size == 0.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:42:16 +01:00
Alexandre Julliard c599ec1494 libwine: Make some loader functions obsolete.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:14:54 +01:00
Alexandre Julliard 39138478fd libwine: Make some functions obsolete.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:14:54 +01:00
Alexandre Julliard 4b5c67ee0b unicode: Remove case mappings that don't round-trip.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 21:11:29 +01:00
Zhiyi Zhang e41547c548 ntdll: Fix some Rtl* functions having wrong calling convention.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-16 12:21:11 +01:00
Alex Henrie 42525d8516 ntdll/tests: Fix expected RtlIpv6StringToAddress terminator output.
The "broken" function was applied to the wrong condition in the "ok"
statement (RtlIpv6StringToAddress is supposed to set the terminator to
the first character after the address, not the second-to-last character
of the address). However, since this test is already being skipped on XP
and Vista and we really don't need a test for how exactly XP and Vista
are broken, we can just delete it.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-05 17:34:52 +01:00
Zebediah Figura 230a09b707 ntdll: Fix a typo in get_current_directory().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48415
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-05 17:34:17 +01:00
Alexandre Julliard d96331d830 ntdll: Make loop counter signed.
Spotted by Gianfranco Costamagna.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48398
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-04 11:22:08 +01:00
Zebediah Figura 7662fe0b47 ntdll/tests: Fix some exception test failures.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-02 19:16:02 +01:00
Zebediah Figura d409ef0188 ntdll: Avoid debug traces in _vsnprintf().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-02 17:39:28 +01:00
Zebediah Figura 3b09a6b1bc ntdll/tests: Fix some test failures with Windows 10.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:45 +01:00
Alexandre Julliard aeab1b2a6b ntdll: Fix memory leak in RtlNormalizeString().
Spotted by Piotr Caban.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:38 +01:00
Alexandre Julliard ddb6f150e1 ntdll: Fix memory corruption in RtlNormalizeString().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 17:58:34 +01:00
Rémi Bernon 5eca6ffa8b ntdll: Start find_free_area from address_space_start instead of 0.
The search was initiated with base == 0, which returns NULL immediately
if MEM_TOP_DOWN is not used. Use address_space_start instead.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47974
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:11:19 +01:00
Rémi Bernon 1a44ef3237 ntdll: Replace incorrect find_free_reserved_area function call.
This introduces map_free_area function which tries mapping the expected
free areas until it finds one that succeeds. It now also works for
memory regions outside of the reserved region, but could probably be
improved.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:11:16 +01:00
Rémi Bernon cec83fede4 ntdll: Split view search initialization to find_view_inside_range function.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:11:08 +01:00
Rémi Bernon d840d7852b ntdll: Rename find_free_area to find_reserved_free_area.
We used this function to find free areas outside of the reserved range,
and it's obviously incorrect as there can be some system or external
memory mapping we don't know about.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:03:19 +01:00
Zebediah Figura 347b3b42fe ntdll/tests: Remove a no longer reliable test.
On Windows 10 version 1607, a process called "Memory Compression" violates this
invariant.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 22:08:32 +01:00
Dmitry Timoshkov b95d2f553c ntdll: Use default casemap and codepage file names if the value in registry is empty.
This helps to keep compatibility with old prefixes being reused for wine-5.0.
Old prefixes in their registry have

[System\\CurrentControlSet\\Control\\Nls\\Codepage]
"37"=""

[System\\CurrentControlSet\\Control\\Nls\\Language]
"0409"=""

and this leads to LCMapString(LCMAP_LOWERCASE/LCMAP_UPPERCASE) return garbage.

This is a regression caused by 94a3add0ea.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-24 20:21:11 +01:00
Erich E. Hoover 94675cd8e3 ntdll: Drop support for floating point numbers in sscanf.
Takes care of one more use of "long double".

Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-23 10:51:08 +01:00
Alexandre Julliard 238c6be5b8 ntdll: Silence the timezone fixme when the registry is empty.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48300
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 19:39:14 +01:00
Alexandre Julliard f391ae901e ntdll: Fix loading the main binary as PE file with an explicit dll override.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Alexandre Julliard 8b0a7b2503 ntdll: Fix RtlQueryUnbiasedInterruptTime() prototype.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48239
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 18:44:57 +01:00
Zebediah Figura 18c3c2c78b ntdll: Return -1 from Unix code page conversion functions if an error was encountered.
If 0 is returned, the caller has no way of determining this. This fixes a
test failure in kernel32:change introduced by f46fa9c92.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 11:57:27 +01:00
Paul Gofman 74a74556dd server: Support creating processes with specified parent.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47817
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:13:36 +01:00
Francois Gouget 101be282a6 ntdll: Fix the spelling of some comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:05 +01:00
Alexandre Julliard 6731f33d40 ntdll: Add status code for ELOOP error.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Alexandre Julliard 30e5f1215e kernel32: Remove __wine_kernel_init().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 18:24:32 +01:00
Nikolay Sivov a5bc81ebe5 ntdll/tests: Enable some more string API tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:45 +01:00
Alexandre Julliard 5de7b6a159 ntdll: Fix contents of the glyph table in generated codepage data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Alexandre Julliard 117dbfa2cf ntdll: Fix DBCS mappings in RtlCustomCPToUnicodeN().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 19:50:06 +01:00
Paul Gofman 923e62eb55 ntdll: Add DECLSPEC_HOTPATCH to NtProtectVirtualMemory().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48077
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:57:13 +01:00
Alexandre Julliard 331947c993 kernel32: Move some initialization code to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Alexandre Julliard d33504b9bb kernel32: Use the Rtl UTF8 conversion functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00