From fb4116ee02cb4e8f31a2f4de7bd3b6ebfdfc7a2d Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Mon, 6 May 2019 22:55:33 +0200 Subject: [PATCH] kernel32: Add K32GetWsChangesEx stub. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47131 Signed-off-by: Louis Lenders Signed-off-by: Alexandre Julliard --- .../api-ms-win-core-psapi-l1-1-0.spec | 2 +- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/virtual.c | 11 +++++++++++ dlls/kernelbase/kernelbase.spec | 2 +- dlls/psapi/psapi.spec | 1 + include/psapi.h | 7 +++++++ 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec b/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec index c966b3ff0d5..c54c1077843 100644 --- a/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec +++ b/dlls/api-ms-win-core-psapi-l1-1-0/api-ms-win-core-psapi-l1-1-0.spec @@ -9,7 +9,7 @@ @ stdcall K32GetProcessImageFileNameW(long ptr long) kernel32.K32GetProcessImageFileNameW @ stdcall K32GetProcessMemoryInfo(long ptr long) kernel32.K32GetProcessMemoryInfo @ stdcall K32GetWsChanges(long ptr long) kernel32.K32GetWsChanges -@ stub K32GetWsChangesEx +@ stdcall K32GetWsChangesEx(long ptr ptr) kernel32.K32GetWsChangesEx @ stdcall K32InitializeProcessForWsWatch(long) kernel32.K32InitializeProcessForWsWatch @ stdcall K32QueryWorkingSet(long ptr long) kernel32.K32QueryWorkingSet @ stdcall K32QueryWorkingSetEx(long ptr long) kernel32.K32QueryWorkingSetEx diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 295a4dbab60..2e2828e58b0 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1018,7 +1018,7 @@ @ stdcall K32GetProcessImageFileNameW(long ptr long) @ stdcall K32GetProcessMemoryInfo(long ptr long) @ stdcall K32GetWsChanges(long ptr long) -# @ stub K32GetWsChangesEx +@ stdcall K32GetWsChangesEx(long ptr ptr) @ stdcall K32InitializeProcessForWsWatch(long) @ stdcall K32QueryWorkingSet(long ptr long) @ stdcall K32QueryWorkingSetEx(long ptr long) diff --git a/dlls/kernel32/virtual.c b/dlls/kernel32/virtual.c index 59c96bd215b..a5a2dfdf270 100644 --- a/dlls/kernel32/virtual.c +++ b/dlls/kernel32/virtual.c @@ -724,6 +724,17 @@ BOOL WINAPI K32GetWsChanges(HANDLE process, PPSAPI_WS_WATCH_INFORMATION watchinf return TRUE; } +/*********************************************************************** + * K32GetWsChangesEx (KERNEL32.@) + */ +BOOL WINAPI K32GetWsChangesEx(HANDLE process, PSAPI_WS_WATCH_INFORMATION_EX *watchinfoex, DWORD *size) +{ + FIXME_(seh)("(%p, %p, %p)\n", process, watchinfoex, size); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + /*********************************************************************** * K32InitializeProcessForWsWatch (KERNEL32.@) */ diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 22ea65fe1c6..9bba9ae5455 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -908,7 +908,7 @@ @ stdcall K32GetProcessImageFileNameW(long ptr long) kernel32.K32GetProcessImageFileNameW @ stdcall K32GetProcessMemoryInfo(long ptr long) kernel32.K32GetProcessMemoryInfo @ stdcall K32GetWsChanges(long ptr long) kernel32.K32GetWsChanges -# @ stub K32GetWsChangesEx +@ stdcall K32GetWsChangesEx(long ptr ptr) kernel32.K32GetWsChangesEx @ stdcall K32InitializeProcessForWsWatch(long) kernel32.K32InitializeProcessForWsWatch @ stdcall K32QueryWorkingSet(long ptr long) kernel32.K32QueryWorkingSet @ stdcall K32QueryWorkingSetEx(long ptr long) kernel32.K32QueryWorkingSetEx diff --git a/dlls/psapi/psapi.spec b/dlls/psapi/psapi.spec index d6116f8c647..6a7bc14815a 100644 --- a/dlls/psapi/psapi.spec +++ b/dlls/psapi/psapi.spec @@ -21,6 +21,7 @@ @ stdcall GetProcessImageFileNameW(long ptr long) kernel32.K32GetProcessImageFileNameW @ stdcall GetProcessMemoryInfo(long ptr long) kernel32.K32GetProcessMemoryInfo @ stdcall GetWsChanges(long ptr long) kernel32.K32GetWsChanges +@ stdcall GetWsChangesEx(long ptr ptr) kernel32.K32GetWsChangesEx @ stdcall InitializeProcessForWsWatch(long) kernel32.K32InitializeProcessForWsWatch @ stdcall QueryWorkingSet(long ptr long) kernel32.K32QueryWorkingSet @ stdcall QueryWorkingSetEx(long ptr long) kernel32.K32QueryWorkingSetEx diff --git a/include/psapi.h b/include/psapi.h index c7663f856d6..742bf7b574a 100644 --- a/include/psapi.h +++ b/include/psapi.h @@ -50,6 +50,12 @@ typedef struct _PSAPI_WS_WATCH_INFORMATION { LPVOID FaultingVa; } PSAPI_WS_WATCH_INFORMATION, *PPSAPI_WS_WATCH_INFORMATION; +typedef struct _PSAPI_WS_WATCH_INFORMATION_EX { + PSAPI_WS_WATCH_INFORMATION BasicInfo; + ULONG_PTR FaultingThreadId; + ULONG_PTR Flags; +} PSAPI_WS_WATCH_INFORMATION_EX, *PPSAPI_WS_WATCH_INFORMATION_EX; + typedef struct _PERFORMANCE_INFORMATION { DWORD cb; SIZE_T CommitTotal; @@ -128,6 +134,7 @@ BOOL WINAPI QueryWorkingSet(HANDLE, PVOID, DWORD); BOOL WINAPI QueryWorkingSetEx(HANDLE, PVOID, DWORD); BOOL WINAPI InitializeProcessForWsWatch(HANDLE); BOOL WINAPI GetWsChanges(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD); +BOOL WINAPI GetWsChangesEx(HANDLE, PSAPI_WS_WATCH_INFORMATION_EX*, DWORD*); DWORD WINAPI GetMappedFileNameW(HANDLE, LPVOID, LPWSTR, DWORD); DWORD WINAPI GetMappedFileNameA(HANDLE, LPVOID, LPSTR, DWORD); #define GetMappedFileName WINELIB_NAME_AW(GetMappedFileName)