implemented QueryWorkingSet()
Modified: trunk/reactos/lib/psapi/makefile
Deleted: trunk/reactos/lib/psapi/misc/stubs.c
Modified: trunk/reactos/lib/psapi/misc/win32.c

Modified: trunk/reactos/lib/psapi/makefile
--- trunk/reactos/lib/psapi/makefile	2005-01-15 02:33:06 UTC (rev 13051)
+++ trunk/reactos/lib/psapi/makefile	2005-01-15 02:44:25 UTC (rev 13052)
@@ -22,7 +22,6 @@
 TARGET_OBJECTS = \
 	misc/dllmain.o \
 	misc/malloc.o \
-	misc/stubs.o \
 	misc/win32.o
 	
 DEP_OBJECTS = $(TARGET_OBJECTS)

Deleted: trunk/reactos/lib/psapi/misc/stubs.c
--- trunk/reactos/lib/psapi/misc/stubs.c	2005-01-15 02:33:06 UTC (rev 13051)
+++ trunk/reactos/lib/psapi/misc/stubs.c	2005-01-15 02:44:25 UTC (rev 13052)
@@ -1,22 +0,0 @@
-/* $Id$ */
-#include "precomp.h"
-
-#define NDEBUG
-#include <debug.h>
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-QueryWorkingSet(HANDLE hProcess,
-                PVOID pv,
-                DWORD cb)
-{
-  DPRINT1("PSAPI: QueryWorkingSet is UNIMPLEMENTED!\n");
-  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-  return FALSE;
-}
-
-/* EOF */

Modified: trunk/reactos/lib/psapi/misc/win32.c
--- trunk/reactos/lib/psapi/misc/win32.c	2005-01-15 02:33:06 UTC (rev 13051)
+++ trunk/reactos/lib/psapi/misc/win32.c	2005-01-15 02:44:25 UTC (rev 13052)
@@ -1365,4 +1365,31 @@
   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 */