mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
implemented InitializeProcessForWsWatch() and GetWsChanges()
svn path=/trunk/; revision=11492
This commit is contained in:
parent
0e568c5b9f
commit
f33c6e48c8
2 changed files with 44 additions and 20 deletions
|
@ -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 @@ BOOL STDCALL GetProcessMemoryInfo(
|
|||
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
|
||||
|
|
|
@ -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 @@ BOOL STDCALL GetModuleInformation(
|
|||
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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue