diff --git a/reactos/lib/psapi/makefile b/reactos/lib/psapi/makefile index db62edba3f4..8aa4c427c18 100644 --- a/reactos/lib/psapi/makefile +++ b/reactos/lib/psapi/makefile @@ -22,7 +22,6 @@ TARGET_PCH = precomp.h TARGET_OBJECTS = \ misc/dllmain.o \ misc/malloc.o \ - misc/stubs.o \ misc/win32.o DEP_OBJECTS = $(TARGET_OBJECTS) diff --git a/reactos/lib/psapi/misc/stubs.c b/reactos/lib/psapi/misc/stubs.c deleted file mode 100644 index a27bae87945..00000000000 --- a/reactos/lib/psapi/misc/stubs.c +++ /dev/null @@ -1,22 +0,0 @@ -/* $Id$ */ -#include "precomp.h" - -#define NDEBUG -#include - - -/* - * @unimplemented - */ -BOOL -STDCALL -QueryWorkingSet(HANDLE hProcess, - PVOID pv, - DWORD cb) -{ - DPRINT1("PSAPI: QueryWorkingSet is UNIMPLEMENTED!\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/* EOF */ diff --git a/reactos/lib/psapi/misc/win32.c b/reactos/lib/psapi/misc/win32.c index a1870db1ffe..025610fe7f4 100644 --- a/reactos/lib/psapi/misc/win32.c +++ b/reactos/lib/psapi/misc/win32.c @@ -1365,4 +1365,31 @@ GetProcessMemoryInfo(HANDLE Process, return Ret; } + +/* + * @implemented + */ +BOOL +STDCALL +QueryWorkingSet(HANDLE hProcess, + PVOID pv, + DWORD cb) +{ + NTSTATUS Status; + + Status = NtQueryVirtualMemory(hProcess, + NULL, + MemoryWorkingSetList, + pv, + cb, + NULL); + if(!NT_SUCCESS(Status)) + { + SetLastErrorByStatus(Status); + return FALSE; + } + + return TRUE; +} + /* EOF */