reactos/lib/psapi/misc
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
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 */