Commit in reactos/lib/psapi/misc on MAIN
stubs.c+1-191.4 -> 1.5
win32.c+43-11.9 -> 1.10
+44-20
2 modified files
implemented InitializeProcessForWsWatch() and GetWsChanges()

reactos/lib/psapi/misc
stubs.c 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- stubs.c	31 Aug 2002 15:36:56 -0000	1.4
+++ stubs.c	31 Oct 2004 01:23:05 -0000	1.5
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.4 2002/08/31 15:36:56 hyperion Exp $ */
+/* $Id: stubs.c,v 1.5 2004/10/31 01:23:05 weiden Exp $ */
 #include <windows.h>
 #include <psapi.h>
 
@@ -32,24 +32,6 @@
  return FALSE;
 }
 
-BOOL STDCALL GetWsChanges(
-  HANDLE hProcess,                         // handle to process
-  PPSAPI_WS_WATCH_INFORMATION lpWatchInfo, // buffer
-  DWORD cb                                 // size of buffer
-)
-{
- SetLastError(ERROR_INVALID_FUNCTION);
- return FALSE;
-}
-
-BOOL STDCALL InitializeProcessForWsWatch(
-  HANDLE hProcess  // handle to process
-)
-{
- SetLastError(ERROR_INVALID_FUNCTION);
- return FALSE;
-}
-
 BOOL STDCALL QueryWorkingSet(
   HANDLE hProcess,  // handle to process
   PVOID pv,         // information buffer

reactos/lib/psapi/misc
win32.c 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- win32.c	1 Jun 2003 14:59:02 -0000	1.9
+++ win32.c	31 Oct 2004 01:23:05 -0000	1.10
@@ -1,4 +1,4 @@
-/* $Id: win32.c,v 1.9 2003/06/01 14:59:02 chorns Exp $
+/* $Id: win32.c,v 1.10 2004/10/31 01:23:05 weiden Exp $
  */
 /*
  * COPYRIGHT:   See COPYING in the top level directory
@@ -945,5 +945,47 @@
   cb
  );
 }
+
+BOOL
+STDCALL
+InitializeProcessForWsWatch(HANDLE hProcess)
+{
+  NTSTATUS Status;
+
+  Status = NtSetInformationProcess(hProcess,
+                                   ProcessWorkingSetWatch,
+                                   NULL,
+                                   0);
+  if(!NT_SUCCESS(Status))
+  {
+    SetLastError(RtlNtStatusToDosError(Status));
+    return FALSE;
+  }
+
+  return TRUE;
+}
+
+BOOL
+STDCALL
+GetWsChanges(HANDLE hProcess,
+             PPSAPI_WS_WATCH_INFORMATION lpWatchInfo,
+             DWORD cb)
+{
+  NTSTATUS Status;
+
+  Status = NtQueryInformationProcess(hProcess,
+                                     ProcessWorkingSetWatch,
+                                     (PVOID)lpWatchInfo,
+                                     cb,
+                                     NULL);
+  if(!NT_SUCCESS(Status))
+  {
+    SetLastError(RtlNtStatusToDosError(Status));
+    return FALSE;
+  }
+
+  return TRUE;
+}
+
 /* EOF */
 
CVSspam 0.2.8