kernel32: Add stub for SetProcessWorkingSetSizeEx.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45523
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
André Hentschel 2018-09-16 16:59:21 +02:00 committed by Alexandre Julliard
parent 180c033c1c
commit 7e39544bfa
6 changed files with 32 additions and 13 deletions

View File

@ -15,7 +15,7 @@
@ stdcall QueryMemoryResourceNotification(ptr ptr) kernel32.QueryMemoryResourceNotification
@ stdcall ReadProcessMemory(long ptr ptr long ptr) kernel32.ReadProcessMemory
@ stdcall ResetWriteWatch(ptr long) kernel32.ResetWriteWatch
@ stub SetProcessWorkingSetSizeEx
@ stdcall SetProcessWorkingSetSizeEx(long long long long) kernel32.SetProcessWorkingSetSizeEx
@ stdcall SetSystemFileCacheSize(long long long) kernel32.SetSystemFileCacheSize
@ stdcall UnmapViewOfFile(ptr) kernel32.UnmapViewOfFile
@ stub UnmapViewOfFileEx

View File

@ -21,7 +21,7 @@
@ stdcall ReadProcessMemory(long ptr ptr long ptr) kernel32.ReadProcessMemory
@ stub RegisterBadMemoryNotification
@ stdcall ResetWriteWatch(ptr long) kernel32.ResetWriteWatch
@ stub SetProcessWorkingSetSizeEx
@ stdcall SetProcessWorkingSetSizeEx(long long long long) kernel32.SetProcessWorkingSetSizeEx
@ stdcall SetSystemFileCacheSize(long long long) kernel32.SetSystemFileCacheSize
@ stdcall UnmapViewOfFile(ptr) kernel32.UnmapViewOfFile
@ stub UnmapViewOfFileEx

View File

@ -1434,7 +1434,7 @@
@ stdcall SetProcessShutdownParameters(long long)
# @ stub SetProcessUserModeExceptionPolicy
@ stdcall SetProcessWorkingSetSize(long long long)
# @ stub SetProcessWorkingSetSizeEx
@ stdcall SetProcessWorkingSetSizeEx(long long long long)
@ stdcall SetSearchPathMode(long)
@ stdcall SetStdHandle(long long)
# @ stub SetStdHandleEx

View File

@ -3389,12 +3389,36 @@ err:
}
/***********************************************************************
* SetProcessWorkingSetSizeEx [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
* flags [I] Flags to enforce working set sizes
*
* RETURNS
* Success: TRUE
* Failure: FALSE
*/
BOOL WINAPI SetProcessWorkingSetSizeEx(HANDLE process, SIZE_T minset, SIZE_T maxset, DWORD flags)
{
WARN("(%p,%ld,%ld,%x): stub - harmless\n", process, minset, maxset, flags);
if(( minset == (SIZE_T)-1) && (maxset == (SIZE_T)-1)) {
/* Trim the working set to zero */
/* Swap the process out of physical RAM */
}
return TRUE;
}
/***********************************************************************
* SetProcessWorkingSetSize [KERNEL32.@]
* Sets the min/max working set sizes for a specified process.
*
* PARAMS
* hProcess [I] Handle to the process of interest
* process [I] Handle to the process of interest
* minset [I] Specifies minimum working set size
* maxset [I] Specifies maximum working set size
*
@ -3402,15 +3426,9 @@ err:
* Success: TRUE
* Failure: FALSE
*/
BOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess, SIZE_T minset,
SIZE_T maxset)
BOOL WINAPI SetProcessWorkingSetSize(HANDLE process, SIZE_T minset, SIZE_T maxset)
{
WARN("(%p,%ld,%ld): stub - harmless\n",hProcess,minset,maxset);
if(( minset == (SIZE_T)-1) && (maxset == (SIZE_T)-1)) {
/* Trim the working set to zero */
/* Swap the process out of physical RAM */
}
return TRUE;
return SetProcessWorkingSetSizeEx(process, minset, maxset, 0);
}
/***********************************************************************

View File

@ -1461,7 +1461,7 @@
@ stdcall SetProcessPriorityBoost(long long) kernel32.SetProcessPriorityBoost
@ stdcall SetProcessShutdownParameters(long long) kernel32.SetProcessShutdownParameters
# @ stub SetProcessValidCallTargets
# @ stub SetProcessWorkingSetSizeEx
@ stdcall SetProcessWorkingSetSizeEx(long long long long) kernel32.SetProcessWorkingSetSizeEx
# @ stub SetProtectedPolicy
# @ stub SetRoamingLastObservedChangeTime
@ stub SetSecurityAccessMask

View File

@ -2597,6 +2597,7 @@ WINBASEAPI BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD_PTR);
WINBASEAPI BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL);
WINBASEAPI BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD);
WINBASEAPI BOOL WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T);
WINBASEAPI BOOL WINAPI SetProcessWorkingSetSizeEx(HANDLE,SIZE_T,SIZE_T,DWORD);
WINBASEAPI BOOL WINAPI SetSearchPathMode(DWORD);
WINADVAPI BOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
WINADVAPI BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);