Commit c1c70c62 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

kernel32: Moved QueryWorkingSet and QueryWorkingSetEx implementation to kernel32.

parent f123b6a7
......@@ -772,6 +772,8 @@
@ stdcall K32GetProcessImageFileNameW(long ptr long)
@ stdcall K32EnumProcessModules(long ptr long ptr)
@ stdcall K32EnumProcesses(ptr long ptr)
@ stdcall K32QueryWorkingSet(long ptr long)
@ stdcall K32QueryWorkingSetEx(long ptr long)
@ stdcall -i386 -private -register K32Thk1632Epilog() krnl386.exe16.K32Thk1632Epilog
@ stdcall -i386 -private -register K32Thk1632Prolog() krnl386.exe16.K32Thk1632Prolog
@ stdcall LCIDToLocaleName(long ptr long long)
......
......@@ -3584,6 +3584,44 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
}
/***********************************************************************
* K32QueryWorkingSet (KERNEL32.@)
*/
BOOL WINAPI K32QueryWorkingSet( HANDLE process, LPVOID buffer, DWORD size )
{
NTSTATUS status;
TRACE( "(%p, %p, %d)\n", process, buffer, size );
status = NtQueryVirtualMemory( process, NULL, MemoryWorkingSetList, buffer, size, NULL );
if (status)
{
SetLastError( RtlNtStatusToDosError( status ) );
return FALSE;
}
return TRUE;
}
/***********************************************************************
* K32QueryWorkingSetEx (KERNEL32.@)
*/
BOOL WINAPI K32QueryWorkingSetEx( HANDLE process, LPVOID buffer, DWORD size )
{
NTSTATUS status;
TRACE( "(%p, %p, %d)\n", process, buffer, size );
status = NtQueryVirtualMemory( process, NULL, MemoryWorkingSetList, buffer, size, NULL );
if (status)
{
SetLastError( RtlNtStatusToDosError( status ) );
return FALSE;
}
return TRUE;
}
/***********************************************************************
* ProcessIdToSessionId (KERNEL32.@)
* This function is available on Terminal Server 4SP4 and Windows 2000
*/
......
......@@ -21,5 +21,5 @@
@ stdcall GetProcessMemoryInfo(long ptr long)
@ stdcall GetWsChanges(long ptr long)
@ stdcall InitializeProcessForWsWatch(long)
@ stdcall QueryWorkingSet(long ptr long)
@ stdcall QueryWorkingSetEx(long ptr long)
@ stdcall QueryWorkingSet(long ptr long) kernel32.K32QueryWorkingSet
@ stdcall QueryWorkingSetEx(long ptr long) kernel32.K32QueryWorkingSetEx
......@@ -475,41 +475,3 @@ BOOL WINAPI InitializeProcessForWsWatch(HANDLE hProcess)
return TRUE;
}
/***********************************************************************
* QueryWorkingSet (PSAPI.@)
*/
BOOL WINAPI QueryWorkingSet( HANDLE process, LPVOID buffer, DWORD size )
{
NTSTATUS status;
TRACE( "(%p, %p, %d)\n", process, buffer, size );
status = NtQueryVirtualMemory( process, NULL, MemoryWorkingSetList, buffer, size, NULL );
if (status)
{
SetLastError( RtlNtStatusToDosError( status ) );
return FALSE;
}
return TRUE;
}
/***********************************************************************
* QueryWorkingSetEx (PSAPI.@)
*/
BOOL WINAPI QueryWorkingSetEx( HANDLE process, LPVOID buffer, DWORD size )
{
NTSTATUS status;
TRACE( "(%p, %p, %d)\n", process, buffer, size );
status = NtQueryVirtualMemory( process, NULL, MemoryWorkingSetList, buffer, size, NULL );
if (status)
{
SetLastError( RtlNtStatusToDosError( status ) );
return FALSE;
}
return TRUE;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment