Commit Graph

3843 Commits

Author SHA1 Message Date
Alexandre Julliard 97479d3d32 ntdll: Move some exception definitions to winternl.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 13:52:42 +02:00
Paul Gofman 7c523f4867 kernelbase: Fix string size variable overflow in GetModuleFileNameW().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51833
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-04 15:52:16 +02:00
Paul Gofman 39a3549093 ntdll: Implement LdrGetDllFullName() function.
Based on a patch by Alex Henrie.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 08:52:46 +02:00
Paul Gofman 50bc449a74 ntdll/tests: Add test for LdrGetDllFullName().
Based on a patch by Alex Henrie.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 08:52:24 +02:00
Paul Gofman 7ddd79b8f5 kernelbase: Sanitize flags in GetModuleHandleExW().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:15 +02:00
Paul Gofman cf0a828b02 ntdll: Implement LdrGetDllHandleEx() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:15 +02:00
Alexandre Julliard 088a787a2c makefiles: Make -mno-cygwin the default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Nikolay Sivov b68b08b5de kernel32/tests: Fix sprintf() arguments (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:41:32 +02:00
Gabriel Ivăncescu 2fe70331d9 ntdll: Implement JobObjectBasicProcessIdList for NtQueryInformationJobObject.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:24:14 +02:00
Zebediah Figura 5af74129bd ntdll: Do not fill the IOSB if a device IRP failed synchronously.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:30:17 +02:00
Alexandre Julliard c40c0450db Revert "kernel32: Forward power request functions to ntdll."
This reverts commit 49ffaddf9b.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51741
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 23:21:21 +02:00
Giovanni Mascellani 3e370f761a tzres: Regenerate TZ data from de facto standard sources.
The sources used to regenerate data are:

 * The Olson database, tracing all world time zone changes since 1970,
   widely used under Unix systems and dedicated to the public domain.

 * Unicode CLDR's windowsZones.xml, used by Windows itself as source
   for naming timezones and providing the correspondance with the
   Olson zones. It is licensed under a MIT-styled license.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-07 23:19:22 +02:00
Paul Gofman 03c297b1c1 kernelbase: Mind OS version in the PE header when reporting OS version.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 09:00:22 +02:00
Zebediah Figura a200c47c32 mountmgr: Return STATUS_BUFFER_OVERFLOW if an insufficient buffer is passed to IOCTL_MOUNTMGR_QUERY_POINTS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:57:16 +02:00
Zebediah Figura 17ebac8482 mountmgr: Validate the output size for IOCTL_MOUNTMGR_QUERY_POINTS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:57:11 +02:00
Zebediah Figura c342afeff8 kernel32/tests: Add some tests for IOCTL_MOUNTMGR_QUERY_POINTS.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-31 10:56:55 +02:00
Zebediah Figura c4ff18f765 kernel32: Call kernelbase DeviceIoControl() in kernel32 DeviceIoControl().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 20:27:22 +02:00
Francois Gouget eae25715f5 kernel32/tests: Fix a couple of ASCII / ANSI mixups in ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 20:25:05 +02:00
Francois Gouget 463850baa6 kernel32/tests: Fix ASCII / ANSI mixups in comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 20:25:05 +02:00
Francois Gouget e87e24a3c1 kernel32: Fix ASCII / ANSI mixups in comments.
It's quite possible that the device name is entirely composed of ASCII
characters but, as far as the API is concerned, it's still an ANSI
string.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 20:25:05 +02:00
Francois Gouget c388453184 kernel32: Fix NLS_GetDateTimeFormatA() Unicode to ANSI conversion.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Francois Gouget 263157a03d kernel32/tests: Test GetDateFormatA()'s Unicode to ANSI conversion.
The ANSI string may be longer than the Unicode one and
GetDateFormatA()'s return value should reflect that.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Francois Gouget 10db4147dd kernel32/tests: Test GetTimeFormatA()'s Unicode to ANSI conversion.
The ANSI string may be longer than the Unicode one and the return
value should reflect that.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Francois Gouget 3144fbc347 kernel32/tests: Remove the macros from the GetNumberFormatEx() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 18:28:50 +02:00
Francois Gouget b020ab629d kernel32/tests: Remove the macros from the GetDateFormatW() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 18:28:47 +02:00
Francois Gouget 6e2a4a6762 kernel32/tests: Remove the macros from the GetDateFormatEx() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 18:28:43 +02:00
Francois Gouget 2ee1399786 kernel32/tests: Remove the macros from the GetTimeFormatEx() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:55 +02:00
Francois Gouget f0ec42c879 kernel32/tests: Remove the macros from the GetDateFormatA() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:53 +02:00
Francois Gouget 01309cc020 kernel32/tests: Remove the macros from the GetNumberFormatA() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:51 +02:00
Francois Gouget b8f1435a53 kernel32/tests: Remove the macros from the GetCurrencyFormatA() tests.
Also simplify testing all the NegativeOrder values.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:49 +02:00
Francois Gouget 68a3863470 kernel32/tests: Remove the macros from the GetTimeFormatA() tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 12:08:14 +02:00
Francois Gouget 6c58776d0d kernel32/tests: Don't allow the pre-Vista locale results.
This simplifies the Get*Format() tests.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 12:08:05 +02:00
Francois Gouget 2e89691bb6 kernel32/tests: Don't skip the CompareStringA() tests on Windows.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 12:06:20 +02:00
Hugh McMaster ec25eeab4c kernel32/tests: Add tests for SetCurrentConsoleFontEx.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 20:59:49 +02:00
Francois Gouget 01d513da8f kernel32/tests: Don't skip the sorting tests on Windows.
Only skip them in Wine since it's missing a compatible collation table.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:30:30 +02:00
Jacek Caban da86e50e29 conhost: Use message window to return a window for windowless consoles.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38640
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:16:49 +02:00
Jacek Caban 365e99c022 conhost: Use dedicated ioctl for GetConsoleWindow.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:16:49 +02:00
Hugh McMaster 9ce8aafdae kernel32/tests: Fix rounding error when calculating console font size.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 21:40:48 +02:00
Austin English 06104aec96 kernel32: Add GetCurrentPackagePath stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51374
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Alexandre Julliard 0bce76d830 ntdll: Move the loading of the global options to the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 11:45:51 +02:00
Alexandre Julliard c6373abc10 ntdll: Update the MEMORY_INFORMATION_CLASS enumeration.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Alexandre Julliard 9bf46d5ce6 ntdll: Make wine_nt_to_unix_file_name() and wine_unix_to_nt_file_name() follow NT syscall conventions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 22:57:38 +02:00
Paul Gofman 90d3b9a313 kernelbase: Don't allow converting thread to fiber more than once.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 10:16:25 +02:00
Hugh McMaster f1023b4b52 conhost: Popup Attributes should match Character Attributes when creating a new screen buffer.
Popup Attributes should match Character Attributes when a new screen
buffer is created. The existing Popup Attributes are copied when
using a pseudo console.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 21:44:25 +02:00
Hugh McMaster b17eb27112 conhost: Copy Character Attributes (colors) to the new screen buffer.
CreateConsoleScreenBuffer() copies the Character Attributes (colors)
to the new screen buffer when called.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Hugh McMaster b6e707ee60 kernel32/tests: Test whether font information and window size are copied to the new screen buffer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:34 +02:00
Hugh McMaster 0a6d0e689b kernel32/tests: Test whether console color attributes are copied to the new screen buffer.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:34 +02:00
Francois Gouget 542dc085c9 kernel32/tests: Allow failure when loading the 268 bytes minimal PE image.
Windows 10 1809+ rejects this minimal image so allow ERROR_BAD_EXE_FORMAT
as a valid result.
Also adjust the comment to reflect the range of Windows versions that
usually accept this image and note that there are some exceptions which
means there are other unidentified factors at play.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=51185
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:47:06 +02:00
Francois Gouget 566a98800d kernel32/tests: Use WineTest contexts to simplify test_Loader().
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:33:09 +02:00
Alexandre Julliard 649f70aba7 server: Don't generate dll load event for native binaries on Wow64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-09 22:15:30 +02:00