2003-06-27 06:08:04 +02:00
|
|
|
/*
|
|
|
|
* Win32 processes
|
|
|
|
*
|
|
|
|
* Copyright 1996, 1998 Alexandre Julliard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2003-06-27 06:08:04 +02:00
|
|
|
*/
|
|
|
|
|
2003-09-17 07:31:32 +02:00
|
|
|
#include <assert.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <signal.h>
|
2009-12-30 23:36:56 +01:00
|
|
|
#include <stdarg.h>
|
2003-09-17 07:31:32 +02:00
|
|
|
#include <stdio.h>
|
2004-03-10 00:51:02 +01:00
|
|
|
#include <time.h>
|
2003-09-17 07:31:32 +02:00
|
|
|
|
2005-11-28 17:32:54 +01:00
|
|
|
#include "ntstatus.h"
|
|
|
|
#define WIN32_NO_STATUS
|
2005-06-06 22:13:08 +02:00
|
|
|
#include "winternl.h"
|
2019-07-01 17:44:38 +02:00
|
|
|
#include "winbase.h"
|
2020-09-28 16:34:11 +02:00
|
|
|
#include "winnls.h"
|
2019-07-01 17:44:38 +02:00
|
|
|
#include "wincon.h"
|
2003-09-17 07:31:32 +02:00
|
|
|
#include "kernel_private.h"
|
2011-05-12 14:19:40 +02:00
|
|
|
#include "psapi.h"
|
2021-01-29 05:08:21 +01:00
|
|
|
#include "ddk/wdm.h"
|
2017-12-04 13:13:05 +01:00
|
|
|
#include "wine/exception.h"
|
2019-05-14 12:30:46 +02:00
|
|
|
#include "wine/asm.h"
|
2003-06-27 06:08:04 +02:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
2003-09-17 07:31:32 +02:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(process);
|
|
|
|
|
2021-01-29 05:08:21 +01:00
|
|
|
static const struct _KUSER_SHARED_DATA *user_shared_data = (struct _KUSER_SHARED_DATA *)0x7ffe0000;
|
|
|
|
|
2003-11-17 21:16:38 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
LPSTR lpEnvAddress;
|
|
|
|
LPSTR lpCmdLine;
|
|
|
|
LPSTR lpCmdShow;
|
|
|
|
DWORD dwReserved;
|
|
|
|
} LOADPARMS32;
|
|
|
|
|
2013-01-08 22:02:21 +01:00
|
|
|
SYSTEM_BASIC_INFORMATION system_info = { 0 };
|
2003-09-17 07:31:32 +02:00
|
|
|
|
|
|
|
/* Process flags */
|
|
|
|
#define PDB32_DEBUGGED 0x0001 /* Process is being debugged */
|
|
|
|
#define PDB32_WIN16_PROC 0x0008 /* Win16 process */
|
|
|
|
#define PDB32_DOS_PROC 0x0010 /* Dos process */
|
|
|
|
#define PDB32_CONSOLE_PROC 0x0020 /* Console process */
|
|
|
|
#define PDB32_FILE_APIS_OEM 0x0040 /* File APIs are OEM */
|
|
|
|
#define PDB32_WIN32S_PROC 0x8000 /* Win32s process */
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* wait_input_idle
|
|
|
|
*
|
|
|
|
* Wrapper to call WaitForInputIdle USER function
|
|
|
|
*/
|
|
|
|
typedef DWORD (WINAPI *WaitForInputIdle_ptr)( HANDLE hProcess, DWORD dwTimeOut );
|
|
|
|
|
|
|
|
static DWORD wait_input_idle( HANDLE process, DWORD timeout )
|
|
|
|
{
|
|
|
|
HMODULE mod = GetModuleHandleA( "user32.dll" );
|
|
|
|
if (mod)
|
|
|
|
{
|
|
|
|
WaitForInputIdle_ptr ptr = (WaitForInputIdle_ptr)GetProcAddress( mod, "WaitForInputIdle" );
|
|
|
|
if (ptr) return ptr( process, timeout );
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WinExec (KERNEL32.@)
|
|
|
|
*/
|
2015-11-12 16:05:01 +01:00
|
|
|
UINT WINAPI DECLSPEC_HOTPATCH WinExec( LPCSTR lpCmdLine, UINT nCmdShow )
|
2003-09-17 07:31:32 +02:00
|
|
|
{
|
|
|
|
PROCESS_INFORMATION info;
|
|
|
|
STARTUPINFOA startup;
|
|
|
|
char *cmdline;
|
|
|
|
UINT ret;
|
|
|
|
|
|
|
|
memset( &startup, 0, sizeof(startup) );
|
|
|
|
startup.cb = sizeof(startup);
|
|
|
|
startup.dwFlags = STARTF_USESHOWWINDOW;
|
|
|
|
startup.wShowWindow = nCmdShow;
|
|
|
|
|
2006-12-04 19:55:35 +01:00
|
|
|
/* cmdline needs to be writable for CreateProcess */
|
2003-09-17 07:31:32 +02:00
|
|
|
if (!(cmdline = HeapAlloc( GetProcessHeap(), 0, strlen(lpCmdLine)+1 ))) return 0;
|
|
|
|
strcpy( cmdline, lpCmdLine );
|
|
|
|
|
|
|
|
if (CreateProcessA( NULL, cmdline, NULL, NULL, FALSE,
|
|
|
|
0, NULL, NULL, &startup, &info ))
|
|
|
|
{
|
|
|
|
/* Give 30 seconds to the app to come up */
|
2003-10-16 21:31:11 +02:00
|
|
|
if (wait_input_idle( info.hProcess, 30000 ) == WAIT_FAILED)
|
2006-10-12 22:56:29 +02:00
|
|
|
WARN("WaitForInputIdle failed: Error %d\n", GetLastError() );
|
2003-09-17 07:31:32 +02:00
|
|
|
ret = 33;
|
|
|
|
/* Close off the handles */
|
|
|
|
CloseHandle( info.hThread );
|
|
|
|
CloseHandle( info.hProcess );
|
|
|
|
}
|
|
|
|
else if ((ret = GetLastError()) >= 32)
|
|
|
|
{
|
|
|
|
FIXME("Strange error set by CreateProcess: %d\n", ret );
|
|
|
|
ret = 11;
|
|
|
|
}
|
|
|
|
HeapFree( GetProcessHeap(), 0, cmdline );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* LoadModule (KERNEL32.@)
|
|
|
|
*/
|
2010-10-11 12:16:51 +02:00
|
|
|
DWORD WINAPI LoadModule( LPCSTR name, LPVOID paramBlock )
|
2003-09-17 07:31:32 +02:00
|
|
|
{
|
2003-11-17 21:16:38 +01:00
|
|
|
LOADPARMS32 *params = paramBlock;
|
2003-09-17 07:31:32 +02:00
|
|
|
PROCESS_INFORMATION info;
|
|
|
|
STARTUPINFOA startup;
|
2010-10-11 12:16:51 +02:00
|
|
|
DWORD ret;
|
2003-09-17 07:31:32 +02:00
|
|
|
LPSTR cmdline, p;
|
|
|
|
char filename[MAX_PATH];
|
|
|
|
BYTE len;
|
|
|
|
|
2010-10-11 12:16:51 +02:00
|
|
|
if (!name) return ERROR_FILE_NOT_FOUND;
|
2003-09-17 07:31:32 +02:00
|
|
|
|
|
|
|
if (!SearchPathA( NULL, name, ".exe", sizeof(filename), filename, NULL ) &&
|
|
|
|
!SearchPathA( NULL, name, NULL, sizeof(filename), filename, NULL ))
|
2010-10-11 12:16:51 +02:00
|
|
|
return GetLastError();
|
2003-09-17 07:31:32 +02:00
|
|
|
|
|
|
|
len = (BYTE)params->lpCmdLine[0];
|
|
|
|
if (!(cmdline = HeapAlloc( GetProcessHeap(), 0, strlen(filename) + len + 2 )))
|
2010-10-11 12:16:51 +02:00
|
|
|
return ERROR_NOT_ENOUGH_MEMORY;
|
2003-09-17 07:31:32 +02:00
|
|
|
|
|
|
|
strcpy( cmdline, filename );
|
|
|
|
p = cmdline + strlen(cmdline);
|
|
|
|
*p++ = ' ';
|
|
|
|
memcpy( p, params->lpCmdLine + 1, len );
|
|
|
|
p[len] = 0;
|
|
|
|
|
|
|
|
memset( &startup, 0, sizeof(startup) );
|
|
|
|
startup.cb = sizeof(startup);
|
|
|
|
if (params->lpCmdShow)
|
|
|
|
{
|
|
|
|
startup.dwFlags = STARTF_USESHOWWINDOW;
|
2003-11-17 21:16:38 +01:00
|
|
|
startup.wShowWindow = ((WORD *)params->lpCmdShow)[1];
|
2003-09-17 07:31:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (CreateProcessA( filename, cmdline, NULL, NULL, FALSE, 0,
|
|
|
|
params->lpEnvAddress, NULL, &startup, &info ))
|
|
|
|
{
|
|
|
|
/* Give 30 seconds to the app to come up */
|
2003-10-16 21:31:11 +02:00
|
|
|
if (wait_input_idle( info.hProcess, 30000 ) == WAIT_FAILED)
|
2006-10-12 22:56:29 +02:00
|
|
|
WARN("WaitForInputIdle failed: Error %d\n", GetLastError() );
|
2010-10-11 12:16:51 +02:00
|
|
|
ret = 33;
|
2003-09-17 07:31:32 +02:00
|
|
|
/* Close off the handles */
|
|
|
|
CloseHandle( info.hThread );
|
|
|
|
CloseHandle( info.hProcess );
|
|
|
|
}
|
2010-10-11 12:16:51 +02:00
|
|
|
else if ((ret = GetLastError()) >= 32)
|
2003-09-17 07:31:32 +02:00
|
|
|
{
|
2010-10-11 12:16:51 +02:00
|
|
|
FIXME("Strange error set by CreateProcess: %u\n", ret );
|
|
|
|
ret = 11;
|
2003-09-17 07:31:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HeapFree( GetProcessHeap(), 0, cmdline );
|
2010-10-11 12:16:51 +02:00
|
|
|
return ret;
|
2003-09-17 07:31:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-10-08 05:57:02 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* ExitProcess (KERNEL32.@)
|
2006-03-31 13:33:04 +02:00
|
|
|
*
|
|
|
|
* Exits the current process.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* status [I] Status code to exit with.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Nothing.
|
2003-10-08 05:57:02 +02:00
|
|
|
*/
|
2008-10-07 18:16:19 +02:00
|
|
|
#ifdef __i386__
|
2009-06-14 15:34:09 +02:00
|
|
|
__ASM_STDCALL_FUNC( ExitProcess, 4, /* Shrinker depend on this particular ExitProcess implementation */
|
2008-10-07 18:16:19 +02:00
|
|
|
"pushl %ebp\n\t"
|
|
|
|
".byte 0x8B, 0xEC\n\t" /* movl %esp, %ebp */
|
|
|
|
".byte 0x6A, 0x00\n\t" /* pushl $0 */
|
|
|
|
".byte 0x68, 0x00, 0x00, 0x00, 0x00\n\t" /* pushl $0 - 4 bytes immediate */
|
|
|
|
"pushl 8(%ebp)\n\t"
|
2019-05-16 18:13:45 +02:00
|
|
|
"call " __ASM_STDCALL("RtlExitUserProcess",4) "\n\t"
|
2008-10-07 18:16:19 +02:00
|
|
|
"leave\n\t"
|
|
|
|
"ret $4" )
|
|
|
|
#else
|
|
|
|
|
2003-10-08 05:57:02 +02:00
|
|
|
void WINAPI ExitProcess( DWORD status )
|
|
|
|
{
|
2013-07-19 12:15:15 +02:00
|
|
|
RtlExitUserProcess( status );
|
2003-10-08 05:57:02 +02:00
|
|
|
}
|
|
|
|
|
2008-10-07 18:16:19 +02:00
|
|
|
#endif
|
2003-10-08 05:57:02 +02:00
|
|
|
|
2003-09-17 07:31:32 +02:00
|
|
|
/***********************************************************************
|
2005-12-21 20:44:49 +01:00
|
|
|
* GetExitCodeProcess [KERNEL32.@]
|
2003-09-17 07:31:32 +02:00
|
|
|
*
|
2005-12-21 20:44:49 +01:00
|
|
|
* Gets termination status of specified process.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hProcess [in] Handle to the process.
|
|
|
|
* lpExitCode [out] Address to receive termination status.
|
2003-09-17 07:31:32 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*/
|
2005-12-21 20:44:49 +01:00
|
|
|
BOOL WINAPI GetExitCodeProcess( HANDLE hProcess, LPDWORD lpExitCode )
|
2003-09-17 07:31:32 +02:00
|
|
|
{
|
2004-06-14 19:02:00 +02:00
|
|
|
PROCESS_BASIC_INFORMATION pbi;
|
|
|
|
|
2019-10-01 09:36:16 +02:00
|
|
|
if (!set_ntstatus( NtQueryInformationProcess( hProcess, ProcessBasicInformation, &pbi, sizeof(pbi), NULL )))
|
|
|
|
return FALSE;
|
|
|
|
if (lpExitCode) *lpExitCode = pbi.ExitStatus;
|
|
|
|
return TRUE;
|
2003-09-17 07:31:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-08 22:30:38 +02:00
|
|
|
/**************************************************************************
|
|
|
|
* FatalExit (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
void WINAPI FatalExit( int code )
|
|
|
|
{
|
|
|
|
WARN( "FatalExit\n" );
|
|
|
|
ExitProcess( code );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetProcessFlags (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI GetProcessFlags( DWORD processid )
|
|
|
|
{
|
|
|
|
IMAGE_NT_HEADERS *nt;
|
|
|
|
DWORD flags = 0;
|
|
|
|
|
|
|
|
if (processid && processid != GetCurrentProcessId()) return 0;
|
|
|
|
|
|
|
|
if ((nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress )))
|
|
|
|
{
|
|
|
|
if (nt->OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI)
|
|
|
|
flags |= PDB32_CONSOLE_PROC;
|
|
|
|
}
|
|
|
|
if (!AreFileApisANSI()) flags |= PDB32_FILE_APIS_OEM;
|
|
|
|
if (IsDebuggerPresent()) flags |= PDB32_DEBUGGED;
|
|
|
|
return flags;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-10-08 06:24:49 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* ConvertToGlobalHandle (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
HANDLE WINAPI ConvertToGlobalHandle(HANDLE hSrc)
|
|
|
|
{
|
|
|
|
HANDLE ret = INVALID_HANDLE_VALUE;
|
|
|
|
DuplicateHandle( GetCurrentProcess(), hSrc, GetCurrentProcess(), &ret, 0, FALSE,
|
2021-02-16 11:27:18 +01:00
|
|
|
DUPLICATE_MAKE_GLOBAL | DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE );
|
2003-10-08 06:24:49 +02:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* SetHandleContext (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI SetHandleContext(HANDLE hnd,DWORD context)
|
|
|
|
{
|
2006-10-12 22:56:29 +02:00
|
|
|
FIXME("(%p,%d), stub. In case this got called by WSOCK32/WS2_32: "
|
2003-10-08 06:24:49 +02:00
|
|
|
"the external WINSOCK DLLs won't work with WINE, don't use them.\n",hnd,context);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* GetHandleContext (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI GetHandleContext(HANDLE hnd)
|
|
|
|
{
|
|
|
|
FIXME("(%p), stub. In case this got called by WSOCK32/WS2_32: "
|
|
|
|
"the external WINSOCK DLLs won't work with WINE, don't use them.\n",hnd);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* CreateSocketHandle (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
HANDLE WINAPI CreateSocketHandle(void)
|
|
|
|
{
|
|
|
|
FIXME("(), stub. In case this got called by WSOCK32/WS2_32: "
|
|
|
|
"the external WINSOCK DLLs won't work with WINE, don't use them.\n");
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return INVALID_HANDLE_VALUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* SetProcessAffinityMask (KERNEL32.@)
|
|
|
|
*/
|
2004-10-20 01:55:15 +02:00
|
|
|
BOOL WINAPI SetProcessAffinityMask( HANDLE hProcess, DWORD_PTR affmask )
|
2003-06-27 06:08:04 +02:00
|
|
|
{
|
2019-10-01 09:36:16 +02:00
|
|
|
return set_ntstatus( NtSetInformationProcess( hProcess, ProcessAffinityMask,
|
|
|
|
&affmask, sizeof(DWORD_PTR) ));
|
2003-06-27 06:08:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* GetProcessAffinityMask (KERNEL32.@)
|
|
|
|
*/
|
2011-04-14 19:57:34 +02:00
|
|
|
BOOL WINAPI GetProcessAffinityMask( HANDLE hProcess, PDWORD_PTR process_mask, PDWORD_PTR system_mask )
|
2003-06-27 06:08:04 +02:00
|
|
|
{
|
2011-04-14 19:57:34 +02:00
|
|
|
if (process_mask)
|
2003-06-27 06:08:04 +02:00
|
|
|
{
|
2019-10-01 09:36:16 +02:00
|
|
|
if (!set_ntstatus( NtQueryInformationProcess( hProcess, ProcessAffinityMask,
|
|
|
|
process_mask, sizeof(*process_mask), NULL )))
|
|
|
|
return FALSE;
|
2003-06-27 06:08:04 +02:00
|
|
|
}
|
2019-10-01 09:36:16 +02:00
|
|
|
if (system_mask)
|
2015-01-21 13:23:36 +01:00
|
|
|
{
|
|
|
|
SYSTEM_BASIC_INFORMATION info;
|
|
|
|
|
2019-10-01 09:36:16 +02:00
|
|
|
if (!set_ntstatus( NtQuerySystemInformation( SystemBasicInformation, &info, sizeof(info), NULL )))
|
|
|
|
return FALSE;
|
|
|
|
*system_mask = info.ActiveProcessorsAffinityMask;
|
2015-01-21 13:23:36 +01:00
|
|
|
}
|
2019-10-01 09:36:16 +02:00
|
|
|
return TRUE;
|
2003-06-27 06:08:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-09-16 16:59:21 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* SetProcessWorkingSetSize [KERNEL32.@]
|
|
|
|
* Sets the min/max working set sizes for a specified process.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* process [I] Handle to the process of interest
|
|
|
|
* minset [I] Specifies minimum working set size
|
|
|
|
* maxset [I] Specifies maximum working set size
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE
|
|
|
|
* Failure: FALSE
|
|
|
|
*/
|
|
|
|
BOOL WINAPI SetProcessWorkingSetSize(HANDLE process, SIZE_T minset, SIZE_T maxset)
|
|
|
|
{
|
|
|
|
return SetProcessWorkingSetSizeEx(process, minset, maxset, 0);
|
|
|
|
}
|
|
|
|
|
2017-09-13 07:10:49 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetProcessWorkingSetSize (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetProcessWorkingSetSize(HANDLE process, SIZE_T *minset, SIZE_T *maxset)
|
|
|
|
{
|
|
|
|
return GetProcessWorkingSetSizeEx(process, minset, maxset, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-09-19 02:06:45 +02:00
|
|
|
/******************************************************************
|
|
|
|
* GetProcessIoCounters (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetProcessIoCounters(HANDLE hProcess, PIO_COUNTERS ioc)
|
|
|
|
{
|
2019-10-01 09:36:16 +02:00
|
|
|
return set_ntstatus( NtQueryInformationProcess(hProcess, ProcessIoCounters, ioc, sizeof(*ioc), NULL ));
|
2007-11-01 07:46:54 +01:00
|
|
|
}
|
|
|
|
|
2003-06-27 06:08:04 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* RegisterServiceProcess (KERNEL32.@)
|
|
|
|
*
|
|
|
|
* A service process calls this function to ensure that it continues to run
|
|
|
|
* even after a user logged off.
|
|
|
|
*/
|
|
|
|
DWORD WINAPI RegisterServiceProcess(DWORD dwProcessId, DWORD dwType)
|
|
|
|
{
|
2004-12-15 11:48:18 +01:00
|
|
|
/* I don't think that Wine needs to do anything in this function */
|
2003-06-27 06:08:04 +02:00
|
|
|
return 1; /* success */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* GetCurrentProcess (KERNEL32.@)
|
2004-12-15 11:48:18 +01:00
|
|
|
*
|
|
|
|
* Get a handle to the current process.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* None.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle representing the current process.
|
2003-06-27 06:08:04 +02:00
|
|
|
*/
|
2019-06-26 12:41:22 +02:00
|
|
|
HANDLE WINAPI KERNEL32_GetCurrentProcess(void)
|
2003-06-27 06:08:04 +02:00
|
|
|
{
|
2008-12-08 15:51:22 +01:00
|
|
|
return (HANDLE)~(ULONG_PTR)0;
|
2003-06-27 06:08:04 +02:00
|
|
|
}
|
2006-02-22 12:54:16 +01:00
|
|
|
|
2020-05-26 14:38:20 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* CreateActCtxA (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
HANDLE WINAPI DECLSPEC_HOTPATCH CreateActCtxA( const ACTCTXA *actctx )
|
|
|
|
{
|
|
|
|
ACTCTXW actw;
|
|
|
|
SIZE_T len;
|
|
|
|
HANDLE ret = INVALID_HANDLE_VALUE;
|
|
|
|
LPWSTR src = NULL, assdir = NULL, resname = NULL, appname = NULL;
|
|
|
|
|
|
|
|
TRACE("%p %08x\n", actctx, actctx ? actctx->dwFlags : 0);
|
|
|
|
|
|
|
|
if (!actctx || actctx->cbSize != sizeof(*actctx))
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return INVALID_HANDLE_VALUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
actw.cbSize = sizeof(actw);
|
|
|
|
actw.dwFlags = actctx->dwFlags;
|
|
|
|
if (actctx->lpSource)
|
|
|
|
{
|
|
|
|
len = MultiByteToWideChar(CP_ACP, 0, actctx->lpSource, -1, NULL, 0);
|
|
|
|
src = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
|
|
|
if (!src) return INVALID_HANDLE_VALUE;
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, actctx->lpSource, -1, src, len);
|
|
|
|
}
|
|
|
|
actw.lpSource = src;
|
|
|
|
|
|
|
|
if (actw.dwFlags & ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID)
|
|
|
|
actw.wProcessorArchitecture = actctx->wProcessorArchitecture;
|
|
|
|
if (actw.dwFlags & ACTCTX_FLAG_LANGID_VALID)
|
|
|
|
actw.wLangId = actctx->wLangId;
|
|
|
|
if (actw.dwFlags & ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID)
|
|
|
|
{
|
|
|
|
len = MultiByteToWideChar(CP_ACP, 0, actctx->lpAssemblyDirectory, -1, NULL, 0);
|
|
|
|
assdir = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
|
|
|
if (!assdir) goto done;
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, actctx->lpAssemblyDirectory, -1, assdir, len);
|
|
|
|
actw.lpAssemblyDirectory = assdir;
|
|
|
|
}
|
|
|
|
if (actw.dwFlags & ACTCTX_FLAG_RESOURCE_NAME_VALID)
|
|
|
|
{
|
|
|
|
if ((ULONG_PTR)actctx->lpResourceName >> 16)
|
|
|
|
{
|
|
|
|
len = MultiByteToWideChar(CP_ACP, 0, actctx->lpResourceName, -1, NULL, 0);
|
|
|
|
resname = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
|
|
|
if (!resname) goto done;
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, actctx->lpResourceName, -1, resname, len);
|
|
|
|
actw.lpResourceName = resname;
|
|
|
|
}
|
|
|
|
else actw.lpResourceName = (LPCWSTR)actctx->lpResourceName;
|
|
|
|
}
|
|
|
|
if (actw.dwFlags & ACTCTX_FLAG_APPLICATION_NAME_VALID)
|
|
|
|
{
|
|
|
|
len = MultiByteToWideChar(CP_ACP, 0, actctx->lpApplicationName, -1, NULL, 0);
|
|
|
|
appname = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
|
|
|
if (!appname) goto done;
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, actctx->lpApplicationName, -1, appname, len);
|
|
|
|
actw.lpApplicationName = appname;
|
|
|
|
}
|
|
|
|
if (actw.dwFlags & ACTCTX_FLAG_HMODULE_VALID)
|
|
|
|
actw.hModule = actctx->hModule;
|
|
|
|
|
|
|
|
ret = CreateActCtxW(&actw);
|
|
|
|
|
|
|
|
done:
|
|
|
|
HeapFree(GetProcessHeap(), 0, src);
|
|
|
|
HeapFree(GetProcessHeap(), 0, assdir);
|
|
|
|
HeapFree(GetProcessHeap(), 0, resname);
|
|
|
|
HeapFree(GetProcessHeap(), 0, appname);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* FindActCtxSectionStringA (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI FindActCtxSectionStringA( DWORD flags, const GUID *guid, ULONG id, const char *search,
|
|
|
|
ACTCTX_SECTION_KEYED_DATA *info )
|
|
|
|
{
|
|
|
|
LPWSTR searchW;
|
|
|
|
DWORD len;
|
|
|
|
BOOL ret;
|
|
|
|
|
|
|
|
TRACE("%08x %s %u %s %p\n", flags, debugstr_guid(guid), id, debugstr_a(search), info);
|
|
|
|
|
|
|
|
if (!search || !info)
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
len = MultiByteToWideChar(CP_ACP, 0, search, -1, NULL, 0);
|
|
|
|
searchW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
|
|
|
MultiByteToWideChar(CP_ACP, 0, search, -1, searchW, len);
|
|
|
|
ret = FindActCtxSectionStringW( flags, guid, id, searchW, info );
|
|
|
|
HeapFree(GetProcessHeap(), 0, searchW);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-02-22 12:54:16 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* CmdBatNotification (KERNEL32.@)
|
|
|
|
*
|
2006-03-31 13:33:04 +02:00
|
|
|
* Notifies the system that a batch file has started or finished.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* bBatchRunning [I] TRUE if a batch file has started or
|
|
|
|
* FALSE if a batch file has finished executing.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Unknown.
|
2006-02-22 12:54:16 +01:00
|
|
|
*/
|
|
|
|
BOOL WINAPI CmdBatNotification( BOOL bBatchRunning )
|
|
|
|
{
|
|
|
|
FIXME("%d\n", bBatchRunning);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2008-01-30 03:37:17 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* RegisterApplicationRestart (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI RegisterApplicationRestart(PCWSTR pwzCommandLine, DWORD dwFlags)
|
|
|
|
{
|
|
|
|
FIXME("(%s,%d)\n", debugstr_w(pwzCommandLine), dwFlags);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
2009-07-16 05:00:13 +02:00
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* WTSGetActiveConsoleSessionId (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI WTSGetActiveConsoleSessionId(void)
|
|
|
|
{
|
2014-01-28 00:57:59 +01:00
|
|
|
static int once;
|
|
|
|
if (!once++) FIXME("stub\n");
|
2015-10-08 14:20:50 +02:00
|
|
|
/* Return current session id. */
|
|
|
|
return NtCurrentTeb()->Peb->SessionId;
|
2009-07-16 05:00:13 +02:00
|
|
|
}
|
2010-09-22 06:17:29 +02:00
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* GetSystemDEPPolicy (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DEP_SYSTEM_POLICY_TYPE WINAPI GetSystemDEPPolicy(void)
|
|
|
|
{
|
2021-01-29 05:08:21 +01:00
|
|
|
return user_shared_data->NXSupportPolicy;
|
2010-09-22 06:17:29 +02:00
|
|
|
}
|
2011-05-22 01:31:58 +02:00
|
|
|
|
2010-11-05 14:10:04 +01:00
|
|
|
/**********************************************************************
|
|
|
|
* SetProcessDEPPolicy (KERNEL32.@)
|
|
|
|
*/
|
2021-01-29 05:08:22 +01:00
|
|
|
BOOL WINAPI SetProcessDEPPolicy( DWORD flags )
|
2010-11-05 14:10:04 +01:00
|
|
|
{
|
2021-01-29 05:08:22 +01:00
|
|
|
ULONG dep_flags = 0;
|
|
|
|
|
|
|
|
TRACE("%#x\n", flags);
|
|
|
|
|
|
|
|
if (flags & PROCESS_DEP_ENABLE)
|
|
|
|
dep_flags |= MEM_EXECUTE_OPTION_DISABLE | MEM_EXECUTE_OPTION_PERMANENT;
|
|
|
|
if (flags & PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION)
|
|
|
|
dep_flags |= MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION;
|
|
|
|
|
|
|
|
return set_ntstatus( NtSetInformationProcess( GetCurrentProcess(), ProcessExecuteFlags,
|
|
|
|
&dep_flags, sizeof(dep_flags) ) );
|
2010-11-05 14:10:04 +01:00
|
|
|
}
|
2011-05-22 01:31:58 +02:00
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* ApplicationRecoveryFinished (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
VOID WINAPI ApplicationRecoveryFinished(BOOL success)
|
|
|
|
{
|
|
|
|
FIXME(": stub\n");
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
}
|
2011-05-22 01:35:01 +02:00
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* ApplicationRecoveryInProgress (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI ApplicationRecoveryInProgress(PBOOL canceled)
|
|
|
|
{
|
|
|
|
FIXME(":%p stub\n", canceled);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
2011-05-22 23:18:06 +02:00
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* RegisterApplicationRecoveryCallback (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI RegisterApplicationRecoveryCallback(APPLICATION_RECOVERY_CALLBACK callback, PVOID param, DWORD pingint, DWORD flags)
|
|
|
|
{
|
2019-12-09 17:32:54 +01:00
|
|
|
FIXME("%p, %p, %d, %d: stub, faking success\n", callback, param, pingint, flags);
|
|
|
|
return S_OK;
|
2011-05-22 23:18:06 +02:00
|
|
|
}
|
2011-06-23 11:09:57 +02:00
|
|
|
|
2020-05-26 14:39:36 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetActiveProcessorGroupCount (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
WORD WINAPI GetActiveProcessorGroupCount(void)
|
|
|
|
{
|
|
|
|
FIXME("semi-stub, always returning 1\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* GetActiveProcessorCount (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI GetActiveProcessorCount(WORD group)
|
|
|
|
{
|
|
|
|
DWORD cpus = system_info.NumberOfProcessors;
|
|
|
|
|
2021-04-26 09:19:14 +02:00
|
|
|
FIXME("(0x%x): semi-stub, returning %u\n", group, cpus);
|
2020-05-26 14:39:36 +02:00
|
|
|
return cpus;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* GetMaximumProcessorCount (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI GetMaximumProcessorCount(WORD group)
|
|
|
|
{
|
|
|
|
DWORD cpus = system_info.NumberOfProcessors;
|
|
|
|
|
2021-04-26 09:19:14 +02:00
|
|
|
FIXME("(0x%x): semi-stub, returning %u\n", group, cpus);
|
2020-05-26 14:39:36 +02:00
|
|
|
return cpus;
|
|
|
|
}
|
|
|
|
|
2021-04-09 22:05:29 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetMaximumProcessorGroupCount (KERNEL32.@)
|
|
|
|
*/
|
2021-05-24 10:10:40 +02:00
|
|
|
WORD WINAPI GetMaximumProcessorGroupCount(void)
|
2021-04-09 22:05:29 +02:00
|
|
|
{
|
|
|
|
FIXME("semi-stub, always returning 1\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2020-05-26 14:42:49 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetFirmwareEnvironmentVariableA (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI GetFirmwareEnvironmentVariableA(LPCSTR name, LPCSTR guid, PVOID buffer, DWORD size)
|
|
|
|
{
|
|
|
|
FIXME("stub: %s %s %p %u\n", debugstr_a(name), debugstr_a(guid), buffer, size);
|
|
|
|
SetLastError(ERROR_INVALID_FUNCTION);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* GetFirmwareEnvironmentVariableW (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
DWORD WINAPI GetFirmwareEnvironmentVariableW(LPCWSTR name, LPCWSTR guid, PVOID buffer, DWORD size)
|
|
|
|
{
|
|
|
|
FIXME("stub: %s %s %p %u\n", debugstr_w(name), debugstr_w(guid), buffer, size);
|
|
|
|
SetLastError(ERROR_INVALID_FUNCTION);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-07-20 06:57:22 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* SetFirmwareEnvironmentVariableW (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI SetFirmwareEnvironmentVariableW(const WCHAR *name, const WCHAR *guid, void *buffer, DWORD size)
|
|
|
|
{
|
|
|
|
FIXME("stub: %s %s %p %u\n", debugstr_w(name), debugstr_w(guid), buffer, size);
|
|
|
|
SetLastError(ERROR_INVALID_FUNCTION);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2011-06-23 11:09:57 +02:00
|
|
|
/**********************************************************************
|
|
|
|
* GetNumaNodeProcessorMask (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetNumaNodeProcessorMask(UCHAR node, PULONGLONG mask)
|
|
|
|
{
|
|
|
|
FIXME("(%c %p): stub\n", node, mask);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* GetNumaAvailableMemoryNode (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetNumaAvailableMemoryNode(UCHAR node, PULONGLONG available_bytes)
|
|
|
|
{
|
|
|
|
FIXME("(%c %p): stub\n", node, available_bytes);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
2011-10-20 00:59:05 +02:00
|
|
|
|
2019-05-08 22:34:08 +02:00
|
|
|
/**********************************************************************
|
|
|
|
* GetNumaAvailableMemoryNodeEx (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetNumaAvailableMemoryNodeEx(USHORT node, PULONGLONG available_bytes)
|
|
|
|
{
|
|
|
|
FIXME("(%hu %p): stub\n", node, available_bytes);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2015-06-29 06:27:34 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetNumaProcessorNode (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetNumaProcessorNode(UCHAR processor, PUCHAR node)
|
|
|
|
{
|
|
|
|
TRACE("(%d, %p)\n", processor, node);
|
|
|
|
|
2020-05-26 14:39:36 +02:00
|
|
|
if (processor < system_info.NumberOfProcessors)
|
2015-06-29 06:27:34 +02:00
|
|
|
{
|
|
|
|
*node = 0;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
*node = 0xFF;
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2019-05-08 22:34:08 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* GetNumaProcessorNodeEx (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetNumaProcessorNodeEx(PPROCESSOR_NUMBER processor, PUSHORT node_number)
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* GetNumaProximityNode (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetNumaProximityNode(ULONG proximity_id, PUCHAR node_number)
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2011-10-20 00:59:05 +02:00
|
|
|
/**********************************************************************
|
|
|
|
* GetProcessDEPPolicy (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetProcessDEPPolicy(HANDLE process, LPDWORD flags, PBOOL permanent)
|
|
|
|
{
|
2014-10-21 07:46:10 +02:00
|
|
|
ULONG dep_flags;
|
|
|
|
|
|
|
|
TRACE("(%p %p %p)\n", process, flags, permanent);
|
|
|
|
|
2019-10-01 09:36:16 +02:00
|
|
|
if (!set_ntstatus( NtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags,
|
|
|
|
&dep_flags, sizeof(dep_flags), NULL )))
|
|
|
|
return FALSE;
|
2014-10-21 07:46:10 +02:00
|
|
|
|
2019-10-01 09:36:16 +02:00
|
|
|
if (flags)
|
|
|
|
{
|
|
|
|
*flags = 0;
|
|
|
|
if (dep_flags & MEM_EXECUTE_OPTION_DISABLE)
|
|
|
|
*flags |= PROCESS_DEP_ENABLE;
|
|
|
|
if (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)
|
|
|
|
*flags |= PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION;
|
2014-10-21 07:46:10 +02:00
|
|
|
}
|
2019-10-01 09:36:16 +02:00
|
|
|
|
|
|
|
if (permanent) *permanent = (dep_flags & MEM_EXECUTE_OPTION_PERMANENT) != 0;
|
|
|
|
return TRUE;
|
2012-05-01 22:26:24 +02:00
|
|
|
}
|
2011-10-20 00:59:05 +02:00
|
|
|
|
2014-06-18 01:24:48 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* UnregisterApplicationRestart (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
HRESULT WINAPI UnregisterApplicationRestart(void)
|
|
|
|
{
|
|
|
|
FIXME(": stub\n");
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return S_OK;
|
|
|
|
}
|
2015-01-23 05:49:59 +01:00
|
|
|
|
2018-03-05 04:59:54 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* CreateUmsCompletionList (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI CreateUmsCompletionList(PUMS_COMPLETION_LIST *list)
|
|
|
|
{
|
|
|
|
FIXME( "%p: stub\n", list );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 04:59:55 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* CreateUmsThreadContext (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI CreateUmsThreadContext(PUMS_CONTEXT *ctx)
|
|
|
|
{
|
|
|
|
FIXME( "%p: stub\n", ctx );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 04:59:57 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* DeleteUmsCompletionList (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI DeleteUmsCompletionList(PUMS_COMPLETION_LIST list)
|
|
|
|
{
|
|
|
|
FIXME( "%p: stub\n", list );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 04:59:58 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* DeleteUmsThreadContext (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI DeleteUmsThreadContext(PUMS_CONTEXT ctx)
|
|
|
|
{
|
|
|
|
FIXME( "%p: stub\n", ctx );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 04:59:59 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* DequeueUmsCompletionListItems (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI DequeueUmsCompletionListItems(void *list, DWORD timeout, PUMS_CONTEXT *ctx)
|
|
|
|
{
|
|
|
|
FIXME( "%p,%08x,%p: stub\n", list, timeout, ctx );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 05:00:00 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* EnterUmsSchedulingMode (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI EnterUmsSchedulingMode(UMS_SCHEDULER_STARTUP_INFO *info)
|
|
|
|
{
|
|
|
|
FIXME( "%p: stub\n", info );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 05:00:02 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* ExecuteUmsThread (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI ExecuteUmsThread(PUMS_CONTEXT ctx)
|
|
|
|
{
|
|
|
|
FIXME( "%p: stub\n", ctx );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 05:00:03 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* GetCurrentUmsThread (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
PUMS_CONTEXT WINAPI GetCurrentUmsThread(void)
|
|
|
|
{
|
|
|
|
FIXME( "stub\n" );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 05:00:04 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* GetNextUmsListItem (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
PUMS_CONTEXT WINAPI GetNextUmsListItem(PUMS_CONTEXT ctx)
|
|
|
|
{
|
|
|
|
FIXME( "%p: stub\n", ctx );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2018-03-05 05:00:05 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* GetUmsCompletionListEvent (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetUmsCompletionListEvent(PUMS_COMPLETION_LIST list, HANDLE *event)
|
|
|
|
{
|
|
|
|
FIXME( "%p,%p: stub\n", list, event );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 05:00:07 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* QueryUmsThreadInformation (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI QueryUmsThreadInformation(PUMS_CONTEXT ctx, UMS_THREAD_INFO_CLASS class,
|
|
|
|
void *buf, ULONG length, ULONG *ret_length)
|
|
|
|
{
|
|
|
|
FIXME( "%p,%08x,%p,%08x,%p: stub\n", ctx, class, buf, length, ret_length );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 05:00:08 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* SetUmsThreadInformation (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI SetUmsThreadInformation(PUMS_CONTEXT ctx, UMS_THREAD_INFO_CLASS class,
|
|
|
|
void *buf, ULONG length)
|
|
|
|
{
|
|
|
|
FIXME( "%p,%08x,%p,%08x: stub\n", ctx, class, buf, length );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-03-05 05:00:09 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* UmsThreadYield (KERNEL32.@)
|
|
|
|
*/
|
|
|
|
BOOL WINAPI UmsThreadYield(void *param)
|
|
|
|
{
|
|
|
|
FIXME( "%p: stub\n", param );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|