Commit Graph

264 Commits

Author SHA1 Message Date
Michael Stefaniuc fe70e0e58f kernel32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Alex Henrie 93711aee1f kernel32: Connect GetSystemFirmwareTable to NtQuerySystemInformation.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-12 12:57:53 +02:00
Sebastian Lackner 61d92d1317 kernel32: Fill stack with meaningful values in call_process_entry mis-align workaround.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-09 10:49:30 +02:00
Thomas Crider 1211b37878 kernel32: Add SetProcessAffinityUpdateMode stub.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-17 10:04:42 +02:00
Piotr Caban 77fa0502fa kernel32: Fix CreateProcess behavior when batch script command contains '"' characters.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-09 09:45:22 +02:00
Austin English 252752f8d9 kernel32: Add GetNumaNodeProcessorMaskEx stub.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-20 12:10:32 +01:00
Alistair Leslie-Hughes aca044139d kernel32: Add UmsThreadYield stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:56:32 -06:00
Alistair Leslie-Hughes 408500115d kernel32: Add SetUmsThreadInformation stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:56:24 -06:00
Alistair Leslie-Hughes 8af9344519 kernel32: Add QueryUmsThreadInformation stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:56:17 -06:00
Alistair Leslie-Hughes e7ff7b5ada kernel32: Add GetUmsCompletionListEvent stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:56:10 -06:00
Alistair Leslie-Hughes ead8dd6f55 kernel32: Add GetNextUmsListItem stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:56:04 -06:00
Alistair Leslie-Hughes c9cb63bed6 kernel32: Add GetCurrentUmsThread stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:55:55 -06:00
Alistair Leslie-Hughes 1e45144570 kernel32: Add ExecuteUmsThread stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:55:43 -06:00
Alistair Leslie-Hughes d371c451e1 kernel32: Add EnterUmsSchedulingMode stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:55:35 -06:00
Alistair Leslie-Hughes 70c8126ffc kernel32: Add DequeueUmsCompletionListItems stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:55:27 -06:00
Alistair Leslie-Hughes bb4872bab0 kernel32: Add DeleteUmsThreadContext stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:55:16 -06:00
Alistair Leslie-Hughes d4819eea0e kernel32: Add DeleteUmsCompletionList stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:55:07 -06:00
Alistair Leslie-Hughes d3f7b119ff kernel32: Add CreateUmsThreadContext stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:54:51 -06:00
Alistair Leslie-Hughes e7bd802caa kernel32: Add CreateUmsCompletionList stub.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:54:04 -06:00
Józef Kucia 665ce1c5eb kernel32: Treat Vulkan environment variables as special variables.
We do not want to inherit Vulkan environment variables from the Unix
environment, e.g. VK_ICD_FILENAMES confuses Windows Vulkan loader.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-01 19:25:58 +01:00
Alexandre Julliard 59a7777f84 kernel32: Hardcode the windows and system directories.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 19:45:58 +01:00
Alexandre Julliard 12276796c9 ntdll: Hardcode the windows and system directories.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 19:38:29 +01:00
Alexandre Julliard 23ec3ce2a3 ntdll: Start process execution directly at the kernel32 process entry point.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-04 15:03:55 +01:00
Alexandre Julliard 5f0a669185 kernel32: Use the magic format string prefix for relay traces.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-25 12:05:40 +01:00
Alexandre Julliard 1d49a57e77 kernel32: Also set the preloader range for 64-bit binaries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-23 11:45:25 +02:00
Sebastian Lackner 59ecc9ccd9 kernel32: Add stub for GetProcessWorkingSetSizeEx.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-13 08:45:22 +02:00
Alexandre Julliard a8d291c0c0 kernel32: Implement safe search mode for SearchPath.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-29 15:51:27 +02:00
Vincent Povirk e8ef521c83 kernel32: Set the ProgramData environment variable.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 14:08:22 +09:00
Zebediah Figura 5155afd882 kernel32: Use the full path as an argument to winevdm.exe.
When starting a 16-bit process using CreateProcess() which resides
in a subdirectory, the directory is changed but winevdm.exe still
attempts to look for the whole path. Thus attempting to start
"install\setup.exe" will cause winevdm.exe to look for
"install\install\setup.exe", which fails.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-01 19:29:14 +02:00
Jacob Lifshay c7ad47e9b2 kernel32: Fix improper escaping of quotes in command line.
Signed-off-by: Jacob Lifshay <programmerjake@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 11:37:02 +01:00
Dmitry Timoshkov 8de06f12dd kernel32: Replace Peb->BeingDebugged check by CheckRemoteDebuggerPresent().
misctool.dll from AmiBroker intentionally sets PEB->BeingDebugged
to a random value returned by RDTSC instruction on PROCESS_ATTACH.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-10 21:39:05 +01:00
Andrew Wesie 06c5a9ab55 ntdll: Read entry point in LdrInitializeThunk.
Overwatch overwrites the PE header contents in a TLS callback. This results in
a crash on wine, because the entry point will be incorrect in start_process.

Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-09 21:37:08 +01:00
Vincent Povirk 0ad641af9c kernel32: DETACHED_PROCESS doesn't affect STARTUPINFO console handles.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 11:14:25 +01:00
Vincent Povirk b1b4de5d6b kernel32: DETACHED_PROCESS prevents automatic std handle inheritance.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 11:13:59 +01:00
Austin English 0df25df828 kernel32: Add BaseFlushAppcompatCache stub.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 16:49:18 +01:00
Huw Davies 4c146152dd kernel32: Implement Process thread attribute lists.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-06 15:44:01 +01:00
Ken Thomases a73045d6a0 kernel32: Overhaul the handling of argv in set_process_name().
This fixes several problems with the code:

* The code had been assuming that the argument strings pointed to by the argv
  array are contiguous iff certain process-name-setting functions are available.
  This doesn't seem reliable.  Instead, test if it's true and shift the strings
  if so.

  However, setproctitle() is specifically documented as a preferred alternative
  to the technique of overwriting the arg strings, so don't shift the strings
  if that's available.

* Use the last path component, recognizing backslash as a path separator, for
  setprogname() in addition to prctl().  First, setprogname() is documented as
  searching for the last component itself, but it doesn't understand Windows-
  style paths, so we need to help it.  Second, on some platforms (e.g. macOS),
  setprogname(), like prctl(), has a fairly small internal length limit (e.g.
  32 characters).  So, concentrate on the most meaningful part of the path.

* Remove argv[0] from argv whether or not there are any process-name-setting
  functions available.  This is necessary for the proper functioning of Wine,
  so it must be done on all platforms.  This part of the logic was lost with
  commit 5a4576ee0.

* Call all available process-name-setting functions instead of treating them
  as mutually exclusive alternatives.  This is also logic that was lost with
  commit 5a4576ee0.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 11:16:11 +09:00
Charles Davis 5a4576ee09 kernel32: Use setprogname(3) to set the program name if available.
Signed-off-by: Charles Davis <cdavis5x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-22 17:37:10 +09:00
Sebastian Lackner 4ac066cdaa kernel32: Do not inherit QT_* environment variables to Windows environment.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 13:34:35 +09:00
Andrew Eikum a124064ce5 ntdll: Implement SystemLogicalProcessorInformationEx.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 00:49:31 +09:00
Nikolay Sivov ae1fe69e39 kernel32: Forward GetLogicalProcessorInformationEx() to ntdll.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-05 15:08:29 +01:00
Jacek Caban 6a7363b694 kernel32: Call registry functions with full key path.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-19 23:56:39 +09:00
Jacek Caban 1130a11cce kernel32: Added DECLSPEC_HOTPATCHABLE to WinExec function.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-13 11:53:04 +09:00
Jacek Caban ebb320fa37 kernel32: Improved WTSGetActiveConsoleSessionId stub.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-08 21:32:49 +09:00
Jacek Caban 888d1c67bb kernel32: Use session id stored in PEB in ProcessIdToSessionId.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-08 21:32:43 +09:00
Qian Hong 34c7a72d14 kernel32: Fix GetComputerName buffer overflow. 2015-07-22 07:27:00 +02:00
Michael Müller d0ae2b0d3d kernel32: Implement GetNumaProcessorNode. 2015-06-29 19:07:51 +09:00
Sebastian Lackner 5bab75166c kernel32: Fix leak of dynamic_buffer in QueryFullProcessImageNameW (Coverity). 2015-03-17 14:52:08 +09:00
Sebastian Lackner d48e3a0bea kernel32: Fix file handle leak in exec_process (Coverity). 2015-03-17 14:52:08 +09:00
Austin English fa80425242 kernel32: Add GetSystemFirmwareTable stub. 2015-01-26 12:06:04 +01:00
Hans Leidekker b51476ad42 kernel32: Retrieve the system affinity mask from ntdll. 2015-01-21 15:30:37 +01:00
Qian Hong bfd088dbc6 kernel32: Fixed buffer size on 64bit in IsWow64Process. 2015-01-16 20:15:32 +01:00
André Hentschel e404d7fea3 kernel32: Set COMPUTERNAME environment variable. 2014-10-28 14:04:54 +09:00
Sebastian Lackner d74c9e3ec2 kernel32: Implement GetProcessDEPPolicy. 2014-10-21 18:51:19 +09:00
Alexandre Julliard ea1689e7b0 kernel32: Add detection of fake dlls when determining a binary type. 2014-08-22 12:44:24 +02:00
Austin English fd6c5490df kernel32: Add a stub for UnregisterApplicationRestart. 2014-06-18 16:31:14 +02:00
Alexandre Julliard 598c5816d9 kernel32: Don't allocate FLS index 0. 2014-03-28 17:46:03 +01:00
Austin English 77bd74fa25 kernel32: Improve GetNumaHighestNodeNumber stub. 2014-03-18 19:05:33 +01:00
Alexandre Julliard 7066ce0b1e kernel32: Set correct binary type for COM and PIF files. 2014-02-12 19:15:11 +01:00
André Hentschel 8439cc9da4 kernel32: Use boolean return values in boolean functions. 2014-01-30 14:51:37 +01:00
Austin English ea765ae005 kernel32: Quiet a noisy FIXME. 2014-01-29 14:58:35 +01:00
Alexandre Julliard 1e78c99388 kernel32: Validate the architecture of newly created processes on the server side. 2013-11-22 12:32:48 +01:00
Alexandre Julliard f2c54dba01 kernel32: Determine the module architecture for all binary types. 2013-11-22 12:25:30 +01:00
Frédéric Delanoy baf491b80b kernel32: Use BOOL type where appropriate. 2013-10-03 12:54:37 +02:00
Frédéric Delanoy 6918c86544 kernel32: Use BOOL type where appropriate. 2013-09-26 21:34:13 +02:00
Alexandre Julliard 3799d55d9b ntdll: Implement RtlExitUserProcess. 2013-07-19 12:15:15 +02:00
Alexandre Julliard c01574d426 kernel32: Acquire the loader lock before shutting down the process. 2013-07-08 15:15:43 +02:00
Dmitry Timoshkov bfcdf6df8e kernel32: Terminate threads before unloading DLLs on process exit. 2013-05-17 12:29:41 +02:00
Dmitry Timoshkov 77f222505c kernel32: Hold PEB lock during process exit. 2013-05-07 11:26:02 +02:00
Dmitry Timoshkov 37f7e7ea0c kernel32: TerminateProcess unlike NtTerminateProcess is supposed to fail with process == 0. 2013-04-12 11:49:17 +02:00
Alexandre Julliard 9181b7e876 kernel32: Fetch the system information only once the memory limits are correct. 2013-04-04 13:28:45 +02:00
Alexandre Julliard 62f22dd4e3 kernel32: Retrieve the system info from ntdll on startup. 2013-01-09 12:15:22 +01:00
Maarten Lankhorst 7457f37e4a ntdll: Set SO_PASSCRED before connecting to eliminate a race condition in obtaining server_pid. 2012-10-18 19:31:15 +02:00
Piotr Caban c6ac0d0fcc kernel32: Added GetLogicalProcessorInformation implementation. 2012-09-04 16:15:56 +02:00
Austin English b4432a6274 kernel32: Only print a fixme once for FlushProcessWriteBuffers. 2012-05-03 11:51:38 +02:00
Austin English 80ef24b057 kernel32: Add a stub for FlushProcessWriteBuffers. 2012-05-02 20:11:54 +02:00
Alexandre Julliard e31dd6dba1 kernel32: Only change the Unix current after exec_process to make sure it's inherited properly. 2012-01-31 13:44:40 +01:00
Alexandre Julliard fe7652d0af kernel32: Don't run a nonexistent builtin from CreateProcess when filename is not specified. 2011-12-14 19:35:10 +01:00
Ken Thomases 5bac5ee26e kernel32: Use double-fork to avoid leaving zombie processes. 2011-12-01 10:27:38 +01:00
Ken Thomases f658feb70f kernel32: No need to reset SIGCHLD because we're not changing it anymore. 2011-12-01 10:11:06 +01:00
Alex Henrie 3aff781f63 kernel32: Output message to stderr in current Unix codepage.
Fixes a bug in which the command "wine /." outputs a garbled error message in languages other than English.
Supersedes "kernel32: Output message to stderr in UTF-8"
2011-10-26 12:41:34 +02:00
Marcus Meissner 615e9572f1 kernel32: Avoid shadowing variables "a", "nt" and "fd". 2011-10-24 12:34:52 +02:00
Austin English d4ec0a19c0 kernel32: Add a stub for GetProcessDEPPolicy. 2011-10-20 11:06:22 +02:00
Francois Gouget a2af890483 kernel32: Fix the NT path returned by QueryFullProcessImageName(). 2011-10-04 15:23:03 -05:00
Alexandre Julliard 3e4a9cb4d4 kernel32: Include system headers before Windows headers. 2011-09-06 13:25:50 +02:00
Francois Gouget 3b239dbc62 kernel32: Implement K32GetProcessImageFileNameA(). 2011-08-05 15:22:47 +02:00
Austin English 1344aec642 kernel32: Stub a few of the numa functions. 2011-06-28 11:57:50 -05:00
Alexandre Julliard 1b0d2330c9 kernel32: Create an orphaned process in exec_process so that all initialization is done anew in the child process. 2011-06-16 22:46:25 +02:00
Austin English e701ca90aa kernel32: Add a stub for RegisterApplicationRecoveryCallback. 2011-05-23 13:16:25 +02:00
Austin English ac2c5039c9 kernel32: Add a stub for ApplicationRecoveryInProgress. 2011-05-23 13:16:25 +02:00
Austin English d7c9723bc1 kernel32: Add a stub for ApplicationRecoveryFinished. 2011-05-23 13:16:24 +02:00
Jacek Caban 8379893f96 kernel32: Moved K32EnumProcessModules to module.c. 2011-05-12 14:28:58 +02:00
Jacek Caban 4ed94f7939 kernel32: Moved GetProcessMemoryInfo implementation to kernel32. 2011-05-12 14:28:45 +02:00
Jacek Caban c1c70c62cb kernel32: Moved QueryWorkingSet and QueryWorkingSetEx implementation to kernel32. 2011-05-11 14:56:49 +02:00
Jacek Caban 362a7d571e kernel32: Moved EnumProcessModules implementation to kernel32. 2011-05-10 14:04:55 +02:00
Jacek Caban 1fa36c85bd kernel32: Moved EnumProcesses implementation to kernel32. 2011-05-04 17:26:45 +02:00
Jacek Caban 25023c1302 psapi: Forward EmptyWorkingSet implementation to kernel32. 2011-04-19 18:29:24 +02:00
Alexandre Julliard baa04014eb ntdll: Implement the ProcessAffinityMask case in NtQueryInformationProcess. 2011-04-14 19:57:34 +02:00
Jacek Caban 81aa05eab6 kernel32: Moved GetProcessImageFileName implementation from psapi to kernel32. 2011-04-08 17:06:46 +02:00
Maarten Lankhorst 8b163d6fb6 kernel32: CreateProcessA should not call CreateProcessW directly. 2011-03-17 10:58:24 +01:00