[ros-diffs] [weiden] 13052: implemented QueryWorkingSet()

weiden at svn.reactos.com weiden at svn.reactos.com
Sat Jan 15 03:44:27 CET 2005


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 */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050115/6e02f276/attachment.html


More information about the Ros-diffs mailing list