kernel32: Moved QueryWorkingSet and QueryWorkingSetEx implementation to kernel32.

This commit is contained in:
Jacek Caban 2011-05-11 13:06:45 +00:00 committed by Alexandre Julliard
parent f123b6a78f
commit c1c70c62cb
4 changed files with 42 additions and 40 deletions

View File

@ -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)

View File

@ -3583,6 +3583,44 @@ BOOL WINAPI K32EnumProcessModules(HANDLE process, HMODULE *lphModule,
return ret == 0;
}
/***********************************************************************
* 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

View File

@ -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

View File

@ -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;
}