Commit Graph

600 Commits

Author SHA1 Message Date
Alexandre Julliard d08f42b68c kernelbase: Move CopyContext() implementation to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-03 17:42:19 +02:00
Rémi Bernon c27b2461a4 kernelbase: Don't strip leading dots in relative paths.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49315
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Alexandre Julliard 036f1f3b83 kernelbase: Fix process access rights in DebugActiveProcess().
PROCESS_QUERY_INFORMATION is needed to check the Wow64 status.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-21 18:10:13 +02:00
Paul Gofman 0f4bc32286 kernelbase: Pass PROC_THREAD_ATTRIBUTE_JOB_LIST to NtCreateUserProcess().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Paul Gofman 0986c8a35f kernelbase: Support PROC_THREAD_ATTRIBUTE_JOB_LIST in UpdateProcThreadAttribute().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Alexandre Julliard ea767728c6 kernelbase: Fix PEB address for Wow64.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51151
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 21:25:00 +02:00
Alexandre Julliard dba8d3c3d4 include: Remove context definitions for obsolete platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-11 20:33:51 +02:00
Alexandre Julliard 40165dfa58 ntdll: RtlCreateUserThread() also takes a zero_bits parameter.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard ea50d41b3f kernelbase: Fix alignment of compatibility context elements.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51080
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 23:13:22 +02:00
Alexandre Julliard 1b7c292d62 kernelbase: Compare against the correct constants in GetNativeSystemInfo().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51082
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Alexandre Julliard 7cdb88a5d8 include: Update the SYSTEM_PROCESS_INFORMATION structure.
Spotted by Alex Henrie.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Alexandre Julliard 9b0a8f5f49 kernelbase: Use RtlWow64GetProcessMachines() to get native system information.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:45 +02:00
Paul Gofman 96abde9eac kernel32: Add stub for SetThreadSelectedCpuSets().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 21:28:47 +02:00
Esme Povirk 404cd8a92b kernelbase: Always remove trailing spaces in PathRemoveBlanks.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 12:17:36 +02:00
Alexandre Julliard 00bd0518ca kernelbase: Fix buffer size passed to read_nt_symlink().
Spotted by David Torok.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 21:00:33 +02:00
Alexandre Julliard 828077e3b3 server: Pass the NT process flags to the new_process request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 12:07:51 +02:00
Paul Gofman 61ca1128d1 kernel32: Implement VirtualAllocFromApp().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 10:34:31 +02:00
Paul Gofman b1e2780eac kernel32: Implement PackageIdFromFullName().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Alexandre Julliard 9f4c47501d kernelbase: Make sure that last error is set on LOAD_LIBRARY_AS_DATAFILE failure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Paul Gofman f2ac82b866 kernel32: Implement GetSystemCpuSetInformation().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Alexandre Julliard f404e309df kernelbase: Don't fall back to dll loading for LOAD_LIBRARY_AS_DATAFILE.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Alexandre Julliard 47fed8f5bc ntdll: Don't set the DllPath parameter by default.
Recent Windows versions don't set it either.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Roman Pišl 33c6a6cb28 kernelbase: Convert DOS to NT path for FileRenameInfo in SetFileInformationByHandle.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50756
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:58:25 +01:00
John Zourlios 0a366f7e4a kernelbase: Accept LINGUISTIC_IGNOREDIACRITIC & SORT_DIGITSASNUMBERS in CompareStringEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50362
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:57 +01:00
Gijs Vermeulen ed61ff43f4 kernelbase: Reject SORT_DIGITSASNUMBERS in CompareStringA().
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:57 +01:00
Alexandre Julliard 4d7b49eae6 kernelbase: Avoid depending on the mount manager in CopyFileExW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 10:28:43 +01:00
Rémi Bernon ae5cd00fcc kernelbase: Do not forcefully reset console_flags to 0.
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>
2021-03-12 17:28:26 +01:00
Alexandre Julliard 6f68543692 make_unicode: Use codepage 949 to add default mappings to codepage 20949.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 13:13:35 +01:00
Sanghoon Park fd3a640206 make_unicode: Add support for codepage 20949 (Korean Wansung).
Signed-off-by: Sanghoon Park <esifea1908@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 13:13:35 +01:00
Aaro Altonen a7d0198418 kernelbase: Add 'Bonaire, Sint Eustatius and Saba' to geoinfodata.
Signed-off-by: Aaro Altonen <a.altonen@hotmail.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 19:01:38 +01:00
Paul Gofman a430a69f8b kernel32: Implement SetUserGeoName().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Paul Gofman e610a56734 kernel32: Implement GetUserDefaultGeoName().
Fixes crash on launch in Outriders demo.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Gijs Vermeulen 5c86b9f1dc kernelbase: Support FileRenameInfo in SetFileInformationByHandle.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50756
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Alexandre Julliard e2659819b8 include: Always define 32- and 64-bit versions of the TEB and PEB structures.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-05 15:53:19 +01:00
Arkadiusz Hiler e51ae86937 kernelbase: Fix GetFileVersionInfo*() crashes with malformed resources.
Some Unity games ship with an encrypted Assembly-CSharp.dll, including
the resources directory, yet the engine still calls GetFileVersionInfoSizeW()
on those files. This may results in a page fault when trying to find the
version resource and takes the whole process down.

The change fixes crashes when launching Home Behind 2 and Crown Trick.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50075
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:45 +01:00
Alexandre Julliard 40e1000fc5 kernelbase: Use the correct machine type for ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +01:00
Alexandre Julliard ff6a3433c5 ntdll: Store the locales in Wine-specific environment variables.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-28 11:30:37 +01:00
Alexandre Julliard 0d173e5710 ntdll: Store the Unix codepage in a Wine-specific environment variable.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-28 11:24:54 +01:00
Akihiro Sagawa d6d99e59e3 ntdll: ObjectName should also be used in NtUnloadKey.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 22:21:13 +01:00
Erich E. Hoover 50903a1504 kernelbase: Reimplement GetVolumeInformation on top of GetVolumeInformationByHandle.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:44:05 +01:00
Alexandre Julliard 4dacf60a6a kernelbase: Don't use wine/server.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 23:01:37 +01:00
Alexandre Julliard bd0a3c1a59 kernelbase: Implement GetMappedFileNameA/W.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 11:02:26 +01:00
Alexandre Julliard a66c383709 kernelbase: Also export the non-K32 names for the psapi functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 10:16:04 +01:00
Alexandre Julliard 3bb5381587 server: Return the NT name for the ProcessImageFileName query.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 18:15:03 +01:00
Zebediah Figura f51e44c180 kernelbase: Map LANG_SERBIAN_NEUTRAL in ConvertDefaultLocale().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:01 +01:00
Jacek Caban 1d36532d22 kernelbase: Support FileEndOfFileInfo in SetFileInformationByHandle.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 21:01:54 +01:00
Alexandre Julliard 7999af8244 ntdll: Implement NtWaitForDebugEvent().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 16:48:09 +01:00
Alexandre Julliard c8f5cced47 ntdll: Implement NtDebugContinue().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:22:23 +01:00
Alexandre Julliard 46b84e7a83 ntdll: Implement NtDebugActiveProcess() and NtRemoveProcessDebug().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:09:01 +01:00
Alexandre Julliard 11e6f1007c ntdll: Pass a debug object in the new_process request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:08:44 +01:00
Alexandre Julliard 7250f9a95b ntdll: Add some more section information data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 18:33:23 +01:00
Martin Storsjo a1955bfb6e ntdll: Implement a no-op __chkstk for arm64.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-21 16:55:53 +01:00
Paul Gofman cf3bb0ce0d kernelbase: Get language sort only when required in LCMapStringEx().
Fixes very slow loading (a few minutes) of Warhammer 40000: Inquisitor
- Martyr after b780e5f5b1.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-08 22:25:59 +01:00
Jacek Caban 60f11d2929 kernelbase: Simplify CreateFileW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 19:51:41 +01:00
Jacek Caban 826a9615e4 kernelbase: Remove no longer needed console handle mapping.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 19:50:30 +01:00
Jacek Caban cbca9f847f kernelbase: Use FileFsDeviceInformation for console handles in GetFileType.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-27 21:59:40 +01:00
Michael Stefaniuc 1b1b6c5f7d kernelbase: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 12:36:53 +01:00
Alexandre Julliard 9dc2892785 include: Use proper dllimports for kernel32 functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 18:41:13 +01:00
Jacek Caban a055f41286 kernelbase: Use NtQueryInformationFile for consoles handles in GetFileSizeEx.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 21:05:04 +01:00
Jacek Caban a66eab0dfb kernelbase: Move Unicode conversion from ReadConsoleA to conhost.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-19 21:44:55 +01:00
Jacek Caban 4cc4ea449b kernelbase: Move Unicode conversion from WriteConsoleA to conhost.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 19:36:06 +01:00
Alexandre Julliard f46e239468 kernelbase: Copy MulDiv() implementation instead of forwarding.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-13 13:18:53 +01:00
Jacek Caban 6b5a263742 kernelbase: Remove no longer needed console handle handling from create_process_params.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 20:22:33 +01:00
Jacek Caban d8d2b8a38d server: Support unbound console output device.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 20:22:33 +01:00
Jacek Caban 4e4872d59d server: Support unbound console input device.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-12 20:22:33 +01:00
Jacek Caban cc5afe41ed kernelbase: Wait directly on console handles.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Paul Gofman 6cf3cbe454 kernelbase: Align stack in GetProcAddress() on x64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 20:30:31 +01:00
Myah Caron c55349f6c8 kernelbase: Implement VirtualAlloc2.
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:35:42 +01:00
Roman Pišl c8af17187e kernelbase: Fix comment and trace message in console.
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 10:58:19 +02:00
Jacek Caban 1d8c2d28cb kernelbase: Move console code page validation to conhost.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:20:43 +02:00
Jacek Caban 01c17ca260 conhost: Remove no longer needed non-blocking IOCTL_CONDRV_READ_INPUT.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:20:31 +02:00
Jacek Caban ea8fa3174c kernel32: Move FlushConsoleInputBuffer to kernelbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:20:05 +02:00
Paul Gofman 976fa1b491 kernelbase: Fix status check in GetExitCodeProcess().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 11:02:20 +02:00
Myah Caron 8a1933bbe4 kernelbase: Remove DECLSPEC_HOTPATCH for GetCommandLine[AW].
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48861
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 11:01:06 +02:00
Myah Caron d01d3b749d kernelbase: Use command_lineW for GetCommandLineW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48861
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 11:01:00 +02:00
Jacek Caban 1b672d1013 kernelbase: Remove no longer needed free_console server call from FreeConsole.
We can depend on closing console connection handle now.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:20:02 +02:00
Jacek Caban eca4d91cad kernelbase: Remove window position adjustment from SetConsoleCursorPosition.
It's done in conhost now.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:19:54 +02:00
Jacek Caban 98dcd3a7ea kernel32: Move ReadConsole and WriteConsole to kernelbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 18:19:48 +02:00
Jacek Caban 859b526c81 kernelbase: Use conhost in AllocConsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:45:05 +02:00
Nikolay Sivov af17fcbc1c kernelbase: Add a name for codepage 708.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 10:42:02 +02:00
Nikolay Sivov 1ca4536f7e nls: Build codepage data for CP708.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 17:22:56 +02:00
Louis Lenders 3d2add846c kernelbase: Return S_OK in WerSetFlags.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49966
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Paul Gofman 905deff5da ntdll: Reimplement FLS data management on top of up to date structures.
Win10 18132 introduced increased FLS data limit and entirely changed
underlying structure.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 12:40:29 +02:00
Paul Gofman 36981ad033 ntdll: Introduce RtlProcessFlsData() and use it for FLS data destruction.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 12:40:29 +02:00
Paul Gofman defcbc8b97 kernelbase: Move FlsGetValue() implementation to ntdll.RtlFlsGetValue().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:43:53 +02:00
Paul Gofman e596f4047b kernelbase: Move FlsSetValue() implementation to ntdll.RtlFlsSetValue().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:43:07 +02:00
Paul Gofman 0627fa9d92 kernelbase: Move FlsFree() implementation to ntdll.RtlFlsFree().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:43:03 +02:00
Paul Gofman c955eee9e8 kernelbase: Move FlsAlloc() implementation to ntdll.RtlFlsAlloc().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:42:58 +02:00
Akihiro Sagawa 80acf7e4ae kernelbase: Fix copy and paste error.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-30 16:55:08 +02:00
Akihiro Sagawa d5edadf35a kernelbase: Improve Get{, Dynamic}TimeZoneInformation() performance.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49808
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 12:12:52 +02:00
Jacek Caban 0e3edfd942 kernelbase: Duplicate input and output handles to ensure that they are inheritable.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:45:29 +02:00
Zebediah Figura 2379e3c181 kernelbase: Pass the token to NtCreateUserProcess().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:19:07 +02:00
Zebediah Figura 6946d78ed9 kernelbase: Implement CreateRestrictedToken().
Based on a patch by Michael Müller.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:58:45 +02:00
Jacek Caban e8e1f1e634 kernel32: Move Beep() to kernelbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:35:35 +02:00
Jacek Caban cd9f96c7ce kernelbase: Move ReadConsoleInput.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:35:35 +02:00
Jacek Caban 54e117018c kernelbase: Use conhost to handle Unix consoles.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban ef57a8df8b kernelbase: Move force override logic to init_console_std_handles callers.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban ca95afd37f kernelbase: Use console connection object in AttachConsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-16 21:09:58 +02:00
Jacek Caban 74192f7a56 kernelbase: Create console connection in init_console.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-16 21:09:58 +02:00
Rémi Bernon 1445ae79e6 kernelbase: Also pass CreateFile2 file flags to CreateFileW.
Instead of just attributes.

Otherwise we may miss important flags like FILE_FLAG_OVERLAPPED and open
the file for synchronous I/O, causing a deadlock in Flight Simulator.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 22:36:13 +02:00
Nikolay Sivov 1c2b14a524 kernelbase: Forward ConvertToAutoInheritPrivateObjectSecurity() to ntdll.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:04 +02:00
Jacek Caban 82e8fd97f6 kernelbase: Use IOCTL_CONDRV_CTRL_EVENT in GenerateConsoleCtrlEvent.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 20:56:43 +02:00
Paul Gofman 81a08cea79 kernel32: Implement CopyContext().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 12:34:43 +02:00
Paul Gofman 85a33ff731 kernel32: Implement GetXStateFeaturesMask().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 12:33:47 +02:00
Paul Gofman 541b06747a kernel32: Implement SetXStateFeaturesMask().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 12:33:44 +02:00
Jacek Caban 26e04d52fe kernelbase: Move KERNEL32_CONSOLE_ALLOC handling to kernelbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:07 +02:00
Paul Gofman ff88ed8b06 kernel32: Implement LocateXStateFeature().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Paul Gofman 2d544ff8a0 kernel32: Implement InitializeContext[2]().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Jacek Caban 76037ffbee kernelbase: Support PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 15:04:31 +02:00
Jacek Caban 0ec191eb0f kernelbase: Add ClosePseudoConsole implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 15:04:04 +02:00
Jacek Caban 7ea9f9edee kernelbase: Add CreatePseudoConsole implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 15:03:52 +02:00
Paul Gofman a4af2b2b70 kernel32: Implement GetEnabledXStateFeatures().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 21:14:15 +02:00
Nikolay Sivov 1721f0ff27 kernelbase: Pass inherited handles list when creating new process.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:48:49 +02:00
Dmitry Timoshkov 3786462a56 kernelbase: Native machine is optional for IsWow64Process2.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49716
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:42:14 +02:00
Jacek Caban 30596feb03 server: Use passed console handle to inherit console for created process.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:39:36 +02:00
Jacek Caban 6cff65900d kernelbase: Use IOCTL_CONDRV_SET_TITLE in SetConsoleTitleW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:39:15 +02:00
Jacek Caban 32eb41de8c kernelbase: Use IOCTL_CONDRV_SET_INPUT_INFO in SetConsoleOutputCP.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:39:12 +02:00
Jacek Caban c6e0cb6c72 kernelbase: Use IOCTL_CONDRV_SET_INPUT_INFO in SetConsoleCP.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:39:08 +02:00
Jacek Caban 7444aa4230 kernelbase: Use IOCTL_CONDRV_GET_TITLE in GetConsoleTitleW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00
Jacek Caban 3576258402 kernelbase: Use IOCTL_CONDRV_GET_INPUT_INFO in GetConsoleOutputCP.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00
Jacek Caban 4faed406d4 kernelbase: Use IOCTL_CONDRV_GET_INPUT_INFO in GetConsoleCP.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00
Jacek Caban 1d65e474b1 kernelbase: Use PEB ConsoleHandle to check for console connection in AllocConsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:13:32 +02:00
Jacek Caban 43ce429234 kernelbase: Move CONTROL_C_EXIT handler to kernelbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:13:26 +02:00
Jacek Caban 06c3e7e44c kernelbase: Close PEB ConsoleHandle in AttachConsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:12:32 +02:00
Jacek Caban 57a222356c kernel32: Set PEB console handle in AllocConsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:12:27 +02:00
Jacek Caban ccaaf6957f kernelbase: Close PEB ConsoleHandle in FreeConsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:12:22 +02:00
Alexandre Julliard 4f3534fa6f kernelbase: Fix console ioctl output sizes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 14:49:24 +02:00
Myah Caron 94b5ccef81 kernelbase/tests: Add test for Sleep(1).
Sleep(1) should sleep until the next kernel tick, not necessarily one
millisecond. Thanks to Henri Verbeet for pointing this out.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49564
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-10 21:28:41 +02:00
Jacek Caban 9b7311e709 kernelbase: Add pseudoconsole stubs.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-10 16:41:58 +02:00
Jacek Caban 1c843d3997 kernelbase: Add missing consts to ScrollConsoleScreenBuffer declaration.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-03 21:23:54 +02:00
Jacek Caban ed83583934 kernelbase: Use init_console_std_handles in AttachConsole.
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 53f17314aa kernelbase: Close handles allocated by AllocConsole in FreeConsole.
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 bd54f39766 kernelbase: Fix handling processes using STARTF_USESTDHANDLES when setting standard handles in AllocConsole.
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 e7550069de kernelbase: Lock console critical section when changing current console.
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 3609406308 kernelbase: Use IOCTL_CONDRV_SCROLL in ScrollConsoleScreenBufferW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-29 14:13:28 +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
Jacek Caban f8fa6fd686 kernelbase: Use IOCTL_CONDRV_READ_OUTPUT in ReadConsoleOutputW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 19:31:37 +02:00
Jacek Caban 5f6bb63800 kernelbase: Use IOCTL_CONDRV_READ_OUTPUT in ReadConsoleOutputAttribute.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 19:31:35 +02:00
Jacek Caban 300a01f467 kernelbase: Use IOCTL_CONDRV_READ_OUTPUT in ReadConsoleOutputCharacterW.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 19:31:33 +02:00
Jacek Caban 7a31d40139 condrv: Rename condrv_write_output_params to condrv_output_params.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 19:31:17 +02:00
Jacek Caban db886f0923 kernelbase: Use IOCTL_CONDRV_WRITE_OUTPUT in WriteConsoleOutputCharacterW.
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 30453f0acf kernelbase: Use IOCTL_CONDRV_WRITE_OUTPUT in WriteConsoleOutputAttribute.
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 09ab7e8a0c kernelbase: Use IOCTL_CONDRV_WRITE_OUTPUT in WriteConsoleOutputW.
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
Jacek Caban f4d7d89550 kernelbase: Use IOCTL_CONDRV_ACTIVATE in SetConsoleActiveScreenBuffer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Jacek Caban 6039b78594 kernelbase: Avoid unneeded GetConsoleOutputCP calls.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Zebediah Figura 1cf4a1c088 kernelbase: Create DOS drive links as permanent objects.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Alexandre Julliard d1f83537e7 kernelbase: Use FSCTL_GET_OBJECT_ID to compare file identities.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Jacek Caban a07aa965e5 kernelbase: Use IOCTL_CONDRV_FILL_OUTPUT in fill_console_output.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 18:27:59 +02:00
Jacek Caban 440e31a732 kernelbase: Use IOCTL_CONDRV_FILL_OUTPUT in FillConsoleOutputAttribute.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 18:27:59 +02:00