Sebastian Lackner : kernel32: Add stub for GetProcessWorkingSetSizeEx.

Alexandre Julliard julliard at winehq.org
Wed Sep 13 14:47:03 CDT 2017


Module: wine
Branch: master
Commit: 59ecc9ccd9f6fc249ff107d96fa31d7afcfbcb79
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=59ecc9ccd9f6fc249ff107d96fa31d7afcfbcb79

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Tue Sep 12 23:10:49 2017 -0600

kernel32: Add stub for GetProcessWorkingSetSizeEx.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 .../api-ms-win-core-memory-l1-1-1.spec               |  2 +-
 .../api-ms-win-core-memory-l1-1-2.spec               |  2 +-
 dlls/kernel32/kernel32.spec                          |  2 +-
 dlls/kernel32/process.c                              | 20 ++++++++++++++++----
 dlls/kernelbase/kernelbase.spec                      |  2 +-
 5 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec b/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec
index 959e65d..42630c1 100644
--- a/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec
+++ b/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec
@@ -4,7 +4,7 @@
 @ stdcall CreateMemoryResourceNotification(long) kernel32.CreateMemoryResourceNotification
 @ stdcall FlushViewOfFile(ptr long) kernel32.FlushViewOfFile
 @ stdcall GetLargePageMinimum() kernel32.GetLargePageMinimum
-@ stub GetProcessWorkingSetSizeEx
+@ stdcall GetProcessWorkingSetSizeEx(long ptr ptr ptr) kernel32.GetProcessWorkingSetSizeEx
 @ stdcall GetSystemFileCacheSize(ptr ptr ptr) kernel32.GetSystemFileCacheSize
 @ stdcall GetWriteWatch(long ptr long ptr ptr ptr) kernel32.GetWriteWatch
 @ stdcall MapViewOfFile(long long long long long) kernel32.MapViewOfFile
diff --git a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec
index 866d20e..6100213 100644
--- a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec
+++ b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec
@@ -8,7 +8,7 @@
 @ stdcall FreeUserPhysicalPages(long ptr ptr) kernel32.FreeUserPhysicalPages
 @ stdcall GetLargePageMinimum() kernel32.GetLargePageMinimum
 @ stub GetMemoryErrorHandlingCapabilities
-@ stub GetProcessWorkingSetSizeEx
+@ stdcall GetProcessWorkingSetSizeEx(long ptr ptr ptr) kernel32.GetProcessWorkingSetSizeEx
 @ stdcall GetSystemFileCacheSize(ptr ptr ptr) kernel32.GetSystemFileCacheSize
 @ stdcall GetWriteWatch(long ptr long ptr ptr ptr) kernel32.GetWriteWatch
 @ stub MapUserPhysicalPages
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index c61e6ac..cf27aea 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -793,7 +793,7 @@
 # @ stub GetProcessUserModeExceptionPolicy
 @ stdcall GetProcessVersion(long)
 @ stdcall GetProcessWorkingSetSize(long ptr ptr)
-# @ stub GetProcessWorkingSetSizeEx
+@ stdcall GetProcessWorkingSetSizeEx(long ptr ptr ptr)
 @ stdcall GetProductInfo(long long long long ptr)
 @ stub GetProductName
 @ stdcall GetProfileIntA(str str long)
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 292317c..2c6229e 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -3424,21 +3424,33 @@ BOOL WINAPI K32EmptyWorkingSet(HANDLE hProcess)
     return SetProcessWorkingSetSize(hProcess, (SIZE_T)-1, (SIZE_T)-1);
 }
 
+
 /***********************************************************************
- *           GetProcessWorkingSetSize    (KERNEL32.@)
+ *           GetProcessWorkingSetSizeEx    (KERNEL32.@)
  */
-BOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess, PSIZE_T minset,
-                                     PSIZE_T maxset)
+BOOL WINAPI GetProcessWorkingSetSizeEx(HANDLE process, SIZE_T *minset,
+                                       SIZE_T *maxset, DWORD *flags)
 {
-    FIXME("(%p,%p,%p): stub\n",hProcess,minset,maxset);
+    FIXME("(%p,%p,%p,%p): stub\n", process, minset, maxset, flags);
     /* 32 MB working set size */
     if (minset) *minset = 32*1024*1024;
     if (maxset) *maxset = 32*1024*1024;
+    if (flags) *flags = QUOTA_LIMITS_HARDWS_MIN_DISABLE |
+                        QUOTA_LIMITS_HARDWS_MAX_DISABLE;
     return TRUE;
 }
 
 
 /***********************************************************************
+ *           GetProcessWorkingSetSize    (KERNEL32.@)
+ */
+BOOL WINAPI GetProcessWorkingSetSize(HANDLE process, SIZE_T *minset, SIZE_T *maxset)
+{
+    return GetProcessWorkingSetSizeEx(process, minset, maxset, NULL);
+}
+
+
+/***********************************************************************
  *           SetProcessShutdownParameters    (KERNEL32.@)
  */
 BOOL WINAPI SetProcessShutdownParameters(DWORD level, DWORD flags)
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index f7d1cc5..f508c25 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -637,7 +637,7 @@
 @ stdcall GetProcessShutdownParameters(ptr ptr) kernel32.GetProcessShutdownParameters
 @ stdcall GetProcessTimes(long ptr ptr ptr ptr) kernel32.GetProcessTimes
 @ stdcall GetProcessVersion(long) kernel32.GetProcessVersion
-# @ stub GetProcessWorkingSetSizeEx
+@ stdcall GetProcessWorkingSetSizeEx(long ptr ptr ptr) kernel32.GetProcessWorkingSetSizeEx
 # @ stub GetProcessorSystemCycleTime
 @ stdcall GetProductInfo(long long long long ptr) kernel32.GetProductInfo
 @ stub GetPtrCalData




More information about the wine-cvs mailing list