mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:56:00 +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 <windows.h>
|
||||||
#include <psapi.h>
|
#include <psapi.h>
|
||||||
|
|
||||||
|
@ -32,24 +32,6 @@ BOOL STDCALL GetProcessMemoryInfo(
|
||||||
return FALSE;
|
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(
|
BOOL STDCALL QueryWorkingSet(
|
||||||
HANDLE hProcess, // handle to process
|
HANDLE hProcess, // handle to process
|
||||||
PVOID pv, // information buffer
|
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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
|
@ -945,5 +945,47 @@ BOOL STDCALL GetModuleInformation(
|
||||||
cb
|
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 */
|
/* EOF */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue