Commit Graph

2031 Commits

Author SHA1 Message Date
Serge Gautherie 99c0ab2ea1 winapi_test: Restore horizontal alignment of macro defines.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-10 21:26:15 +02:00
Jacek Caban a09a268fae kernel32/tests: Add more AllocConsole tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 21:41:47 +02:00
Jacek Caban 1e5cd8fadc kernel32/tests: Add more console output reading tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 19:31:56 +02:00
Zebediah Figura 8acf35b154 kernel32/tests: Relax a timing test.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-27 23:28:16 +02:00
Jacek Caban 716bdfcbfa kernel32/tests: Add more console output tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:49 +02:00
Jacek Caban e613d81d81 kernelbase: Use NtCreateFile in CreateConsoleScreenBuffer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:18:44 +02:00
Zebediah Figura 4ea4289253 kernel32/tests: Add tests for profile registry mapping.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 22:55:44 +02:00
Jacek Caban 48a23dbd43 kernelbase: Use IOCTL_CONDRV_GET_MODE in GetConsoleMode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-13 21:22:13 +02:00
Zebediah Figura 39f59eb020 kernel32/tests: Avoid testing that WaitCommEvent() doesn't return immediately.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-10 13:19:27 +02:00
Jacek Caban eeb1f2b0f0 kernel32/tests: Add more invalid handle tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 19:41:50 +02:00
Myah Caron f2a804b9ea msvcrt: Don't reset MXCSR status in __control87_2 if control information is not changed.
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 19:24:27 +02:00
Zebediah Figura 7ee7953c54 kernel32/tests: Call NtQuerySystemInformation(SystemProcessInformation) until it returns STATUS_SUCCESS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 13:10:13 +02:00
Rémi Bernon ceeb11d2a6 kernel32: Catch process creation breakpoint exceptions.
Metal Gear Solid V: Ground Zeroes attaches itself and continues this
specific breakpoint with DBG_EXCEPTION_NOT_HANDLED. It crashes the
child process and the game terminates.

It is correct for old Windows versions, but more recent versions are
apparently catching exceptions here, and the process should continue.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44127
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-03 11:58:05 +02:00
Jacek Caban e43f51640a kernel32: Return standard input handle in GetConsoleInputWaitHandle.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 20:33:07 +02:00
Alexandre Julliard 8a169390c9 ntdll: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 12:25:08 +02:00
Alexandre Julliard 64731a8e9f ntdll: Fix a few more thread information access rights.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 11:05:53 +02:00
Dmitry Timoshkov c70a303cd4 kernel32: Implement IsWow64Process2.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 11:05:53 +02:00
Dmitry Timoshkov 51ff9aa7cc kernel32/tests: Fix compilation with PSDK.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 09:15:46 +02:00
Changping Yu 59ce4e3eb8 kernel32: Adjust thread creation insertion order.
Signed-off-by: Changping Yu <dead.ash@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 21:07:43 +02:00
Changping Yu ab7485bb4b kernel32/tests: Add test for thread enumeration order in toolhelp.
Signed-off-by: Changping Yu <dead.ash@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 21:07:38 +02:00
Jacek Caban 0556d9e6f1 kernelbase: Use NtCreateFile for console handles in CreateFileW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:52:21 +02:00
Jacek Caban 9bdfb1a29a kernel32/tests: Add more tests for opening console.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 21:50:56 +02:00
Zebediah Figura 22a6c60e18 kernel32/tests: Add tests for profile struct functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 19:22:03 +02:00
André Hentschel d96fe8e1f7 kernel32/tests: Remove support for PPC32.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 16:46:14 +02:00
Nikolay Sivov 72d055854b ntdll: Use single field for misc flags in ComClass redirection section.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 21:03:34 +02:00
Derek Lesho d8d6a6b2e6 server: Partially implement JobObjectBasicAccountingInformation.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Brendan Shanks 7ac949a101 kernel32/tests: Add RegisterWaitForSingleObject() WT_EXECUTEINWAITTHREAD tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 12:12:35 +02:00
Brendan Shanks 08abbf091b kernel32/tests: Fix handle leak.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 12:12:30 +02:00
Alexandre Julliard 20a9ec6c4f kernel32/tests: Avoid some more compiler warning for HeapAlloc() invalid parameter tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-08 14:59:30 +02:00
Alex Henrie e851e747bb kernel32/tests: Fix GetNLSVersion test failure on Windows Server 2003.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 11:59:26 +02:00
Jacek Caban 0a3a2556c1 kernel32/tests: Avoid using abs on ULONGLONG values.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:10:53 +02:00
Jacek Caban 90f81e6198 kernel32/tests: Remove workaround for NT4.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:10:53 +02:00
Alexandre Julliard 6bed2b427b kernel32: Move the *PreferredUILanguages functions to kernelbase and ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 14:31:55 +02:00
Vladimir Panteleev c4ef987429 kernelbase: Fix GetEnvironmentVariableW return for empty variables.
Do the same thing as Vista and up.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48471
Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Vladimir Panteleev 4c06599c1f kernelbase: Don't return ERROR_INSUFFICIENT_BUFFER from GetEnvironmentVariableW.
Windows doesn't do this (except XP, and then only for empty variables,
where it returns ERROR_MORE_DATA).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48471
Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Vladimir Panteleev 7ad5e1bc8a kernelbase: Preserve last error when GetEnvironmentVariableA succeeds.
Avoid clobbering last error with NO_ERROR when GetEnvironmentVariableA
succeeds, matching the behavior of GetEnvironmentVariableW and
Windows.

Instead of naively saving and restoring the last error, call
RtlQueryEnvironmentVariable_U directly to avoid unnecessarily setting
it in the first place.

Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 14:08:51 +02:00
Dmitry Timoshkov 1a7dd7cdbe kernel32/tests: Add a PE test image that resembles format of some of 8k demos.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 11:42:28 +02:00
Alexandre Julliard 8a1656bdf0 kernel32/tests: Add some tests for FormatMessageA/W buffer sizes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 22:05:31 +02:00
Alexandre Julliard 7b01281745 kernelbase: Reimplement FormatMessageA/W using RtlFormatMessage().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 22:05:31 +02:00
Alexandre Julliard f00b88eabd kernel32/tests: Fix some incorrect FormatMessage() tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 19:59:25 +02:00
Alexandre Julliard a946e7fbbe kernel32/tests: Use wide character string literals in FormatMessage() tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 12:46:48 +02:00
Zebediah Figura 877bf2a7a0 kernelbase: Implement SetEnvironmentStrings().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48308
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 11:30:15 +02:00
Zebediah Figura 6849be3ffa kernel32/tests: Fix failures in test_GetThreadSelectorEntry() on 32-bit machines.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 10:52:02 +02:00
Zebediah Figura 42a18cf5fa kernel32/tests: Account for unsupported NLSVERSIONINFOEX.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 10:52:00 +02:00
Jacek Caban c3fac6e36c server: Fix setting context flags in get_thread_context.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49011
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 11:30:30 +02:00
Zebediah Figura ea753c384e include: Rename the other In*OrderModuleList fields to In*OrderLinks for consistency.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:49 +02:00
Zebediah Figura 4b3e820e07 include: Rename InMemoryOrderModuleList to InMemoryOrderLinks.
To match Microsoft's public definition.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:43 +02:00
Zebediah Figura feeb1c7c24 include: Rename LDR_MODULE to LDR_DATA_TABLE_ENTRY.
This name is used in Microsoft's public winternl.h.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:39 +02:00
Paul Gofman a789548502 kernel32/tests: Mark ERROR_HANDLE_EOF result as broken for async file read.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 12:55:40 +02:00
Jacek Caban bffd57d1d2 kernel32/tests: Use DECLSPEC_ALIGN in MSVC compatible way.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 20:55:12 +02:00
Jacek Caban 25ed1d9e82 kernel32/tests: Avoid arithmetic on pointer to stack variable.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 17:19:11 +02:00
Zebediah Figura a6e70c6074 ntdll: Handle unaligned SRW locks when using futexes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 11:23:04 +02:00
Zebediah Figura aceff21022 ntdll: Handle unaligned condition variables when using futexes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48389
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 11:22:59 +02:00
Serge Gautherie 930ff8786f winapi_test: Add DYNAMIC_TIME_ZONE_INFORMATION to tests.dat.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 21:33:30 +02:00
Serge Gautherie 867a0bd6cd winapi_test: Tests.dat needs timezoneapi.h.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 21:33:30 +02:00
Piotr Caban 2df67d56f3 kernel32/tests: Test timeout behaviour on system clock change.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 21:04:04 +02:00
Zebediah Figura 928d1e6447 kernel32: Implement GetVolumeInformationByHandleW().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 09:12:03 +02:00
Andrew Eikum 2cd776fffd kernel32/tests: Actually run OpenFile tests.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:42 +02:00
Alexandre Julliard 6169cacd0d ntdll: Move support for getting LDT entries to the platform-specific files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 12:33:29 +02:00
Zebediah Figura bae4776c57 kernel32: Don't fail ReplaceFile() if unable to delete a generated backup.
Windows will just leave the file if unable to delete it.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Zebediah Figura faebd0ce14 kernel32/tests: Add more tests for deleting and replacing open files.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 12:09:09 +02:00
Rémi Bernon e2a1f00a38 server: Implement DBG_REPLY_LATER handling.
This flag causes the debug event to be replayed after the target thread
continues. It can be used, after suspending the thread, to resume other
threads and later return to the breaking.

This will help implementing gdb continue/step packets correctly.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Rémi Bernon a96393fe26 kernel32/tests: Add tests for ContinueDebugEvent with DBG_REPLY_LATER.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 19:25:25 +01:00
Jacek Caban 1a05b7da63 ntdll: Support device paths in LdrGetDllPath.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48698
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:26:33 +01:00
Francois Gouget 405fd5927a kernel32/tests: Fix the grammar and formatting of a process comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 20:31:18 +01:00
Francois Gouget 7e1b131a85 kernel32/tests: Add a couple of process helper functions.
wait_and_close_child_process() simplifies waiting for the child process
and closing its handles. And because it uses wait_child_process() this
ensures that any error happening in the child process is detected.
reload_child_dump() wraps a cryptic WritePrivateProfileStringA() call
and avoids having to add a comment every time.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 20:31:18 +01:00
Zebediah Figura 9b80443a8f kernel32: Reimplement GetVolumePathName() using NtQueryInformationFile(FileAttributeTagInformation).
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:14:07 +01:00
Zebediah Figura 54bda2991e kernel32/tests: Fix some test failures when run from a mounted folder.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:13:41 +01:00
Francois Gouget f08abe0811 kernel32/tests: Remove an unneeded sprintf() in the process tests.
The buffer content is not used before being overwritten again.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:36:40 +01:00
Francois Gouget 9d38c4864c kernel32/tests: Fix a race condition in test_QueryInformationJobObject().
The process must still be running for AssignProcessToJobObject() to
succeed.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:36:34 +01:00
Serge Gautherie be3cda6ec0 tests: Remove now useless forced _WIN32_WINNT defines.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:30:25 +01:00
Francois Gouget dd4fad93e4 kernel32/test: Fix the semaphore handling in test_WaitForJobObject().
Don't include 'sync ' in the semaphore name because it will end up as
a separate argument in the child process, causing it to not find the
semaphore.  Switch the child to OpenSemaphoreA() to reduce the risk of
accidentally create a new semaphore instead of opening the parent's
one.  Use wait_child_process() instead of a raw
WaitForSingleObject(). The timeout is longer but the process is
expected to exit immediately anyway and this allows proper handling of
child failures (such as if there is a bug with the semaphore
handling).

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 19:33:11 +01:00
Alexandre Julliard 84cca2baae kernelbase: Implement IsValidNLSVersion().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 14:49:36 +01:00
Alexandre Julliard 86522976c9 kernelbase: Implement GetNLSVersion/GetNLSVersionEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-20 14:43:55 +01:00
Zebediah Figura 7c6222838c kernel32/tests: Remove a test for Unix-style paths.
Wine intentionally treats these specially, so there is no point in testing them.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 20:36:07 +01:00
Zebediah Figura 5885c70b18 kernel32/tests: Add some tests for mounted folders.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 20:36:04 +01:00
Gabriel Ivăncescu 543209eb23 kernel32: Implement compatibility mode for VerifyVersionInfo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:31:56 +01:00
Gabriel Ivăncescu 6719bf2e03 kernelbase: Implement compatibility mode for GetVersionEx.
Since Windows 8.1, these functions have been deprecated and run in a sort
of compatibility mode, reporting Windows 8 unless the application supplies a
manifest that specifies compatibility with newer Windows versions explicitly
(by listing their GUIDs).

Some applications have bad non-forward-compatible checks based
on GetVersionEx, and depend on this behavior (they do not supply a
manifest). Currently, they break on Wine if we use a Windows 10 prefix for
example, since we always report the real version. One example is the game
Rock of Ages.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:28:58 +01:00
Gabriel Ivăncescu caff74f369 include/winnt: Add more ACTCTX_COMPATIBILITY_ELEMENT_TYPE definitions and fix typo.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:18:02 +01:00
Alexandre Julliard b780e5f5b1 kernelbase: Use linguistic case table for LCMAP_LINGUISTIC_CASING.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 12:02:53 +01:00
Francois Gouget a909baeb4e tests: Report all errors when failing to wait for a child process.
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Francois Gouget 435b41ec7c kernel32/tests: Clean up the argv[0] tests and improve coverage.
The argv[0] tests mostly care about the value of argvA0 in the child
process. So remove most of the extra arguments and use the remaining
ones to check other aspects.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:42:05 +01:00
Serge Gautherie aa384d3642 tools: Remove 0x0501 API versions forced by winapi_test.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-13 20:10:44 +01:00
Zebediah Figura 8ca5d4af90 kernel32: Reimplement MoveFileWithProgress() on top of NtSetInformationFile(FileRenameInformation).
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Francois Gouget 496100b9a7 kernel32/tests: Remove a 100 ms sleep in 'process exit' children.
Such a short pause cannot serve any purpose and this shaves off 1 to 2
seconds of run time.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 10:11:44 +01:00
Francois Gouget 5a66e3e0d8 kernel32/tests: Fix a race condition in test_WaitForJobObject().
Synchronize with the child process to ensure it does not exit before
being added to the test job.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48642
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 15:58:19 +01:00
Zebediah Figura 2eacc45de3 kernel32/tests: Add more tests for MoveFile[Ex]().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 12:10:52 +01:00
Aaro Altonen b21881f53c kernelbase: Implement SetConsoleScreenBufferInfoEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47288
Signed-off-by: Aaro Altonen <a.altonen@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:58:42 +01:00
Aaro Altonen 723506ef48 kernel32/tests: Add tests for SetConsoleScreenBufferInfoEx().
Signed-off-by: Aaro Altonen <a.altonen@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:57:56 +01:00
Zebediah Figura ee31a622b8 kernel32/tests: Add some tests for hard links.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 09:53:00 +01:00
Francois Gouget e4c15b5bbd kernel32/tests: Fix test_Toolhelp()'s nested process lookup.
On Windows, processes are not reassigned to pid 1 when their parent
dies. This means many processes could have the same ppid despite being
started by unrelated processes. It also means test_Toolhelp() cannot
reliably look up the nested process by its ppid.
So look up for the nested process by its pid and only then check its
ppid, executable file, etc.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48664
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 14:20:26 +01:00
Alexandre Julliard ab9fe967f1 ntdll: Reimplement IdnToUnicode() using the normalization table and the ntdll helpers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Alexandre Julliard 01237d0896 ntdll: Reimplement IdnToAscii() using the normalization table and the ntdll helpers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Alexandre Julliard cd13557f48 ntdll: Reimplement IdnToNameprepUnicode() using the NLS normalization table.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Dmitry Timoshkov 081737379a kernel32: Get[*]PreferredUILanguages should return buffer size when setting ERROR_INSUFFICIENT_BUFFER.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:05:32 +01:00
Dmitry Timoshkov cac0465163 kernel32/tests: Add more tests for Get[*]PreferredUILanguages APIs.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:05:29 +01:00
Dmitry Timoshkov 9870f9325a kernel32/tests: Fix initialization of parameters in Get[*]PreferredUILanguages tests.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:05:24 +01:00
Dmitry Timoshkov 7c461d6302 kernel32/tests: Fix locale.c compilation with Visual Studio 14.0.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:05:13 +01:00
Serge Gautherie a59d6387b6 include: COMMCONFIG.wcProviderData is WCHAR, not DWORD.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-02 13:04:17 +01:00
Alexandre Julliard 4aebd6a95f ntdll: Allow final null in RtlNormalizeString() even if 0 is an invalid character.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-28 16:39:01 +01:00