kernelbase: Also export the non-K32 names for the psapi functions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-02-11 10:16:04 +01:00
parent 6832c6e1f9
commit a66c383709
2 changed files with 120 additions and 92 deletions

View File

@ -30,6 +30,7 @@
#include "winnls.h" #include "winnls.h"
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h" #include "winuser.h"
#define PSAPI_VERSION 1 /* avoid K32 function remapping */
#include "psapi.h" #include "psapi.h"
#include "werapi.h" #include "werapi.h"
@ -910,18 +911,20 @@ static BOOL get_ldr_module32( HANDLE process, HMODULE module, LDR_DATA_TABLE_ENT
/*********************************************************************** /***********************************************************************
* EmptyWorkingSet (kernelbase.@)
* K32EmptyWorkingSet (kernelbase.@) * K32EmptyWorkingSet (kernelbase.@)
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH K32EmptyWorkingSet( HANDLE process ) BOOL WINAPI DECLSPEC_HOTPATCH EmptyWorkingSet( HANDLE process )
{ {
return SetProcessWorkingSetSizeEx( process, (SIZE_T)-1, (SIZE_T)-1, 0 ); return SetProcessWorkingSetSizeEx( process, (SIZE_T)-1, (SIZE_T)-1, 0 );
} }
/*********************************************************************** /***********************************************************************
* EnumDeviceDrivers (kernelbase.@)
* K32EnumDeviceDrivers (kernelbase.@) * K32EnumDeviceDrivers (kernelbase.@)
*/ */
BOOL WINAPI K32EnumDeviceDrivers( void **image_base, DWORD count, DWORD *needed ) BOOL WINAPI EnumDeviceDrivers( void **image_base, DWORD count, DWORD *needed )
{ {
FIXME( "(%p, %d, %p): stub\n", image_base, count, needed ); FIXME( "(%p, %d, %p): stub\n", image_base, count, needed );
if (needed) *needed = 0; if (needed) *needed = 0;
@ -930,9 +933,10 @@ BOOL WINAPI K32EnumDeviceDrivers( void **image_base, DWORD count, DWORD *needed
/*********************************************************************** /***********************************************************************
* EnumPageFilesA (kernelbase.@)
* K32EnumPageFilesA (kernelbase.@) * K32EnumPageFilesA (kernelbase.@)
*/ */
BOOL WINAPI /* DECLSPEC_HOTPATCH */ K32EnumPageFilesA( PENUM_PAGE_FILE_CALLBACKA callback, void *context ) BOOL WINAPI /* DECLSPEC_HOTPATCH */ EnumPageFilesA( PENUM_PAGE_FILE_CALLBACKA callback, void *context )
{ {
FIXME( "(%p, %p) stub\n", callback, context ); FIXME( "(%p, %p) stub\n", callback, context );
return FALSE; return FALSE;
@ -940,9 +944,10 @@ BOOL WINAPI /* DECLSPEC_HOTPATCH */ K32EnumPageFilesA( PENUM_PAGE_FILE_CALLBACKA
/*********************************************************************** /***********************************************************************
* EnumPageFilesW (kernelbase.@)
* K32EnumPageFilesW (kernelbase.@) * K32EnumPageFilesW (kernelbase.@)
*/ */
BOOL WINAPI /* DECLSPEC_HOTPATCH */ K32EnumPageFilesW( PENUM_PAGE_FILE_CALLBACKW callback, void *context ) BOOL WINAPI /* DECLSPEC_HOTPATCH */ EnumPageFilesW( PENUM_PAGE_FILE_CALLBACKW callback, void *context )
{ {
FIXME( "(%p, %p) stub\n", callback, context ); FIXME( "(%p, %p) stub\n", callback, context );
return FALSE; return FALSE;
@ -950,10 +955,11 @@ BOOL WINAPI /* DECLSPEC_HOTPATCH */ K32EnumPageFilesW( PENUM_PAGE_FILE_CALLBACKW
/*********************************************************************** /***********************************************************************
* EnumProcessModules (kernelbase.@)
* K32EnumProcessModules (kernelbase.@) * K32EnumProcessModules (kernelbase.@)
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH K32EnumProcessModules( HANDLE process, HMODULE *module, BOOL WINAPI DECLSPEC_HOTPATCH EnumProcessModules( HANDLE process, HMODULE *module,
DWORD count, DWORD *needed ) DWORD count, DWORD *needed )
{ {
struct module_iterator iter; struct module_iterator iter;
DWORD size = 0; DWORD size = 0;
@ -1022,20 +1028,22 @@ BOOL WINAPI DECLSPEC_HOTPATCH K32EnumProcessModules( HANDLE process, HMODULE *mo
/*********************************************************************** /***********************************************************************
* EnumProcessModulesEx (kernelbase.@)
* K32EnumProcessModulesEx (kernelbase.@) * K32EnumProcessModulesEx (kernelbase.@)
*/ */
BOOL WINAPI K32EnumProcessModulesEx( HANDLE process, HMODULE *module, DWORD count, BOOL WINAPI EnumProcessModulesEx( HANDLE process, HMODULE *module, DWORD count,
DWORD *needed, DWORD filter ) DWORD *needed, DWORD filter )
{ {
FIXME( "(%p, %p, %d, %p, %d) semi-stub\n", process, module, count, needed, filter ); FIXME( "(%p, %p, %d, %p, %d) semi-stub\n", process, module, count, needed, filter );
return K32EnumProcessModules( process, module, count, needed ); return EnumProcessModules( process, module, count, needed );
} }
/*********************************************************************** /***********************************************************************
* EnumProcesses (kernelbase.@)
* K32EnumProcesses (kernelbase.@) * K32EnumProcesses (kernelbase.@)
*/ */
BOOL WINAPI K32EnumProcesses( DWORD *ids, DWORD count, DWORD *used ) BOOL WINAPI EnumProcesses( DWORD *ids, DWORD count, DWORD *used )
{ {
SYSTEM_PROCESS_INFORMATION *spi; SYSTEM_PROCESS_INFORMATION *spi;
ULONG size = 0x4000; ULONG size = 0x4000;
@ -1069,9 +1077,10 @@ BOOL WINAPI K32EnumProcesses( DWORD *ids, DWORD count, DWORD *used )
/*********************************************************************** /***********************************************************************
* GetDeviceDriverBaseNameA (kernelbase.@)
* K32GetDeviceDriverBaseNameA (kernelbase.@) * K32GetDeviceDriverBaseNameA (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetDeviceDriverBaseNameA( void *image_base, char *name, DWORD size ) DWORD WINAPI DECLSPEC_HOTPATCH GetDeviceDriverBaseNameA( void *image_base, char *name, DWORD size )
{ {
FIXME( "(%p, %p, %d): stub\n", image_base, name, size ); FIXME( "(%p, %p, %d): stub\n", image_base, name, size );
if (name && size) name[0] = 0; if (name && size) name[0] = 0;
@ -1080,9 +1089,10 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetDeviceDriverBaseNameA( void *image_base, ch
/*********************************************************************** /***********************************************************************
* GetDeviceDriverBaseNameW (kernelbase.@)
* K32GetDeviceDriverBaseNameW (kernelbase.@) * K32GetDeviceDriverBaseNameW (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetDeviceDriverBaseNameW( void *image_base, WCHAR *name, DWORD size ) DWORD WINAPI DECLSPEC_HOTPATCH GetDeviceDriverBaseNameW( void *image_base, WCHAR *name, DWORD size )
{ {
FIXME( "(%p, %p, %d): stub\n", image_base, name, size ); FIXME( "(%p, %p, %d): stub\n", image_base, name, size );
if (name && size) name[0] = 0; if (name && size) name[0] = 0;
@ -1091,9 +1101,10 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetDeviceDriverBaseNameW( void *image_base, WC
/*********************************************************************** /***********************************************************************
* GetDeviceDriverFileNameA (kernelbase.@)
* K32GetDeviceDriverFileNameA (kernelbase.@) * K32GetDeviceDriverFileNameA (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetDeviceDriverFileNameA( void *image_base, char *name, DWORD size ) DWORD WINAPI DECLSPEC_HOTPATCH GetDeviceDriverFileNameA( void *image_base, char *name, DWORD size )
{ {
FIXME( "(%p, %p, %d): stub\n", image_base, name, size ); FIXME( "(%p, %p, %d): stub\n", image_base, name, size );
if (name && size) name[0] = 0; if (name && size) name[0] = 0;
@ -1102,9 +1113,10 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetDeviceDriverFileNameA( void *image_base, ch
/*********************************************************************** /***********************************************************************
* GetDeviceDriverFileNameW (kernelbase.@)
* K32GetDeviceDriverFileNameW (kernelbase.@) * K32GetDeviceDriverFileNameW (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetDeviceDriverFileNameW( void *image_base, WCHAR *name, DWORD size ) DWORD WINAPI DECLSPEC_HOTPATCH GetDeviceDriverFileNameW( void *image_base, WCHAR *name, DWORD size )
{ {
FIXME( "(%p, %p, %d): stub\n", image_base, name, size ); FIXME( "(%p, %p, %d): stub\n", image_base, name, size );
if (name && size) name[0] = 0; if (name && size) name[0] = 0;
@ -1113,9 +1125,10 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetDeviceDriverFileNameW( void *image_base, WC
/*********************************************************************** /***********************************************************************
* GetMappedFileNameA (kernelbase.@)
* K32GetMappedFileNameA (kernelbase.@) * K32GetMappedFileNameA (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetMappedFileNameA( HANDLE process, void *addr, char *name, DWORD size ) DWORD WINAPI DECLSPEC_HOTPATCH GetMappedFileNameA( HANDLE process, void *addr, char *name, DWORD size )
{ {
FIXME( "(%p, %p, %p, %d): stub\n", process, addr, name, size ); FIXME( "(%p, %p, %p, %d): stub\n", process, addr, name, size );
if (name && size) name[0] = 0; if (name && size) name[0] = 0;
@ -1124,9 +1137,10 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetMappedFileNameA( HANDLE process, void *addr
/*********************************************************************** /***********************************************************************
* GetMappedFileNameW (kernelbase.@)
* K32GetMappedFileNameW (kernelbase.@) * K32GetMappedFileNameW (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetMappedFileNameW( HANDLE process, void *addr, WCHAR *name, DWORD size ) DWORD WINAPI DECLSPEC_HOTPATCH GetMappedFileNameW( HANDLE process, void *addr, WCHAR *name, DWORD size )
{ {
FIXME( "(%p, %p, %p, %d): stub\n", process, addr, name, size ); FIXME( "(%p, %p, %p, %d): stub\n", process, addr, name, size );
if (name && size) name[0] = 0; if (name && size) name[0] = 0;
@ -1135,10 +1149,11 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetMappedFileNameW( HANDLE process, void *addr
/*********************************************************************** /***********************************************************************
* GetModuleBaseNameA (kernelbase.@)
* K32GetModuleBaseNameA (kernelbase.@) * K32GetModuleBaseNameA (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleBaseNameA( HANDLE process, HMODULE module, DWORD WINAPI DECLSPEC_HOTPATCH GetModuleBaseNameA( HANDLE process, HMODULE module,
char *name, DWORD size ) char *name, DWORD size )
{ {
WCHAR *name_w; WCHAR *name_w;
DWORD len, ret = 0; DWORD len, ret = 0;
@ -1150,7 +1165,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleBaseNameA( HANDLE process, HMODULE mo
} }
if (!(name_w = HeapAlloc( GetProcessHeap(), 0, sizeof(WCHAR) * size ))) return 0; if (!(name_w = HeapAlloc( GetProcessHeap(), 0, sizeof(WCHAR) * size ))) return 0;
len = K32GetModuleBaseNameW( process, module, name_w, size ); len = GetModuleBaseNameW( process, module, name_w, size );
TRACE( "%d, %s\n", len, debugstr_w(name_w) ); TRACE( "%d, %s\n", len, debugstr_w(name_w) );
if (len) if (len)
{ {
@ -1163,10 +1178,11 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleBaseNameA( HANDLE process, HMODULE mo
/*********************************************************************** /***********************************************************************
* GetModuleBaseNameW (kernelbase.@)
* K32GetModuleBaseNameW (kernelbase.@) * K32GetModuleBaseNameW (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleBaseNameW( HANDLE process, HMODULE module, DWORD WINAPI DECLSPEC_HOTPATCH GetModuleBaseNameW( HANDLE process, HMODULE module,
WCHAR *name, DWORD size ) WCHAR *name, DWORD size )
{ {
BOOL wow64; BOOL wow64;
@ -1198,10 +1214,11 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleBaseNameW( HANDLE process, HMODULE mo
/*********************************************************************** /***********************************************************************
* GetModuleFileNameExA (kernelbase.@)
* K32GetModuleFileNameExA (kernelbase.@) * K32GetModuleFileNameExA (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleFileNameExA( HANDLE process, HMODULE module, DWORD WINAPI DECLSPEC_HOTPATCH GetModuleFileNameExA( HANDLE process, HMODULE module,
char *name, DWORD size ) char *name, DWORD size )
{ {
WCHAR *ptr; WCHAR *ptr;
DWORD len; DWORD len;
@ -1221,7 +1238,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleFileNameExA( HANDLE process, HMODULE
} }
if (!(ptr = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) return 0; if (!(ptr = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) return 0;
len = K32GetModuleFileNameExW( process, module, ptr, size ); len = GetModuleFileNameExW( process, module, ptr, size );
if (!len) if (!len)
{ {
name[0] = 0; name[0] = 0;
@ -1241,10 +1258,11 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleFileNameExA( HANDLE process, HMODULE
/*********************************************************************** /***********************************************************************
* GetModuleFileNameExW (kernelbase.@)
* K32GetModuleFileNameExW (kernelbase.@) * K32GetModuleFileNameExW (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleFileNameExW( HANDLE process, HMODULE module, DWORD WINAPI DECLSPEC_HOTPATCH GetModuleFileNameExW( HANDLE process, HMODULE module,
WCHAR *name, DWORD size ) WCHAR *name, DWORD size )
{ {
BOOL wow64; BOOL wow64;
DWORD len; DWORD len;
@ -1288,9 +1306,10 @@ DWORD WINAPI DECLSPEC_HOTPATCH K32GetModuleFileNameExW( HANDLE process, HMODULE
/*********************************************************************** /***********************************************************************
* GetModuleInformation (kernelbase.@)
* K32GetModuleInformation (kernelbase.@) * K32GetModuleInformation (kernelbase.@)
*/ */
BOOL WINAPI K32GetModuleInformation( HANDLE process, HMODULE module, MODULEINFO *modinfo, DWORD count ) BOOL WINAPI GetModuleInformation( HANDLE process, HMODULE module, MODULEINFO *modinfo, DWORD count )
{ {
BOOL wow64; BOOL wow64;
@ -1325,9 +1344,10 @@ BOOL WINAPI K32GetModuleInformation( HANDLE process, HMODULE module, MODULEINFO
/*********************************************************************** /***********************************************************************
* GetPerformanceInfo (kernelbase.@)
* K32GetPerformanceInfo (kernelbase.@) * K32GetPerformanceInfo (kernelbase.@)
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH K32GetPerformanceInfo( PPERFORMANCE_INFORMATION info, DWORD size ) BOOL WINAPI DECLSPEC_HOTPATCH GetPerformanceInfo( PPERFORMANCE_INFORMATION info, DWORD size )
{ {
SYSTEM_PERFORMANCE_INFORMATION perf; SYSTEM_PERFORMANCE_INFORMATION perf;
SYSTEM_BASIC_INFORMATION basic; SYSTEM_BASIC_INFORMATION basic;
@ -1395,28 +1415,31 @@ BOOL WINAPI DECLSPEC_HOTPATCH K32GetPerformanceInfo( PPERFORMANCE_INFORMATION in
/*********************************************************************** /***********************************************************************
* GetProcessImageFileNameA (kernelbase.@)
* K32GetProcessImageFileNameA (kernelbase.@) * K32GetProcessImageFileNameA (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetProcessImageFileNameA( HANDLE process, char *file, DWORD size ) DWORD WINAPI DECLSPEC_HOTPATCH GetProcessImageFileNameA( HANDLE process, char *file, DWORD size )
{ {
return QueryFullProcessImageNameA( process, PROCESS_NAME_NATIVE, file, &size ) ? size : 0; return QueryFullProcessImageNameA( process, PROCESS_NAME_NATIVE, file, &size ) ? size : 0;
} }
/*********************************************************************** /***********************************************************************
* GetProcessImageFileNameW (kernelbase.@)
* K32GetProcessImageFileNameW (kernelbase.@) * K32GetProcessImageFileNameW (kernelbase.@)
*/ */
DWORD WINAPI DECLSPEC_HOTPATCH K32GetProcessImageFileNameW( HANDLE process, WCHAR *file, DWORD size ) DWORD WINAPI DECLSPEC_HOTPATCH GetProcessImageFileNameW( HANDLE process, WCHAR *file, DWORD size )
{ {
return QueryFullProcessImageNameW( process, PROCESS_NAME_NATIVE, file, &size ) ? size : 0; return QueryFullProcessImageNameW( process, PROCESS_NAME_NATIVE, file, &size ) ? size : 0;
} }
/*********************************************************************** /***********************************************************************
* GetProcessMemoryInfo (kernelbase.@)
* K32GetProcessMemoryInfo (kernelbase.@) * K32GetProcessMemoryInfo (kernelbase.@)
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH K32GetProcessMemoryInfo( HANDLE process, PROCESS_MEMORY_COUNTERS *pmc, BOOL WINAPI DECLSPEC_HOTPATCH GetProcessMemoryInfo( HANDLE process, PROCESS_MEMORY_COUNTERS *pmc,
DWORD count ) DWORD count )
{ {
VM_COUNTERS vmc; VM_COUNTERS vmc;
@ -1444,9 +1467,10 @@ BOOL WINAPI DECLSPEC_HOTPATCH K32GetProcessMemoryInfo( HANDLE process, PROCESS_M
/*********************************************************************** /***********************************************************************
* GetWsChanges (kernelbase.@)
* K32GetWsChanges (kernelbase.@) * K32GetWsChanges (kernelbase.@)
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH K32GetWsChanges( HANDLE process, PSAPI_WS_WATCH_INFORMATION *info, DWORD size ) BOOL WINAPI DECLSPEC_HOTPATCH GetWsChanges( HANDLE process, PSAPI_WS_WATCH_INFORMATION *info, DWORD size )
{ {
TRACE( "(%p, %p, %d)\n", process, info, size ); TRACE( "(%p, %p, %d)\n", process, info, size );
return set_ntstatus( NtQueryInformationProcess( process, ProcessWorkingSetWatch, info, size, NULL )); return set_ntstatus( NtQueryInformationProcess( process, ProcessWorkingSetWatch, info, size, NULL ));
@ -1454,10 +1478,11 @@ BOOL WINAPI DECLSPEC_HOTPATCH K32GetWsChanges( HANDLE process, PSAPI_WS_WATCH_IN
/*********************************************************************** /***********************************************************************
* GetWsChangesEx (kernelbase.@)
* K32GetWsChangesEx (kernelbase.@) * K32GetWsChangesEx (kernelbase.@)
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH K32GetWsChangesEx( HANDLE process, PSAPI_WS_WATCH_INFORMATION_EX *info, BOOL WINAPI DECLSPEC_HOTPATCH GetWsChangesEx( HANDLE process, PSAPI_WS_WATCH_INFORMATION_EX *info,
DWORD *size ) DWORD *size )
{ {
FIXME( "(%p, %p, %p)\n", process, info, size ); FIXME( "(%p, %p, %p)\n", process, info, size );
SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
@ -1466,9 +1491,10 @@ BOOL WINAPI DECLSPEC_HOTPATCH K32GetWsChangesEx( HANDLE process, PSAPI_WS_WATCH_
/*********************************************************************** /***********************************************************************
* InitializeProcessForWsWatch (kernelbase.@)
* K32InitializeProcessForWsWatch (kernelbase.@) * K32InitializeProcessForWsWatch (kernelbase.@)
*/ */
BOOL WINAPI /* DECLSPEC_HOTPATCH */ K32InitializeProcessForWsWatch( HANDLE process ) BOOL WINAPI /* DECLSPEC_HOTPATCH */ InitializeProcessForWsWatch( HANDLE process )
{ {
FIXME( "(process=%p): stub\n", process ); FIXME( "(process=%p): stub\n", process );
return TRUE; return TRUE;
@ -1476,9 +1502,10 @@ BOOL WINAPI /* DECLSPEC_HOTPATCH */ K32InitializeProcessForWsWatch( HANDLE proce
/*********************************************************************** /***********************************************************************
* QueryWorkingSet (kernelbase.@)
* K32QueryWorkingSet (kernelbase.@) * K32QueryWorkingSet (kernelbase.@)
*/ */
BOOL WINAPI DECLSPEC_HOTPATCH K32QueryWorkingSet( HANDLE process, void *buffer, DWORD size ) BOOL WINAPI DECLSPEC_HOTPATCH QueryWorkingSet( HANDLE process, void *buffer, DWORD size )
{ {
TRACE( "(%p, %p, %d)\n", process, buffer, size ); TRACE( "(%p, %p, %d)\n", process, buffer, size );
return set_ntstatus( NtQueryVirtualMemory( process, NULL, MemoryWorkingSetList, buffer, size, NULL )); return set_ntstatus( NtQueryVirtualMemory( process, NULL, MemoryWorkingSetList, buffer, size, NULL ));
@ -1486,9 +1513,10 @@ BOOL WINAPI DECLSPEC_HOTPATCH K32QueryWorkingSet( HANDLE process, void *buffer,
/*********************************************************************** /***********************************************************************
* QueryWorkingSetEx (kernelbase.@)
* K32QueryWorkingSetEx (kernelbase.@) * K32QueryWorkingSetEx (kernelbase.@)
*/ */
BOOL WINAPI K32QueryWorkingSetEx( HANDLE process, void *buffer, DWORD size ) BOOL WINAPI QueryWorkingSetEx( HANDLE process, void *buffer, DWORD size )
{ {
TRACE( "(%p, %p, %d)\n", process, buffer, size ); TRACE( "(%p, %p, %d)\n", process, buffer, size );
return set_ntstatus( NtQueryVirtualMemory( process, NULL, MemoryWorkingSetExInformation, return set_ntstatus( NtQueryVirtualMemory( process, NULL, MemoryWorkingSetExInformation,

View File

@ -285,7 +285,7 @@
# @ stub DuplicateStateContainerHandle # @ stub DuplicateStateContainerHandle
@ stdcall DuplicateToken(long long ptr) @ stdcall DuplicateToken(long long ptr)
@ stdcall DuplicateTokenEx(long long ptr long long ptr) @ stdcall DuplicateTokenEx(long long ptr long long ptr)
# @ stub EmptyWorkingSet @ stdcall EmptyWorkingSet(long)
@ stdcall EncodePointer(ptr) ntdll.RtlEncodePointer @ stdcall EncodePointer(ptr) ntdll.RtlEncodePointer
# @ stub EncodeRemotePointer # @ stub EncodeRemotePointer
@ stdcall EncodeSystemPointer(ptr) ntdll.RtlEncodeSystemPointer @ stdcall EncodeSystemPointer(ptr) ntdll.RtlEncodeSystemPointer
@ -298,14 +298,14 @@
@ stdcall EnumDateFormatsExEx(ptr wstr long long) @ stdcall EnumDateFormatsExEx(ptr wstr long long)
@ stdcall EnumDateFormatsExW(ptr long long) @ stdcall EnumDateFormatsExW(ptr long long)
@ stdcall EnumDateFormatsW(ptr long long) @ stdcall EnumDateFormatsW(ptr long long)
# @ stub EnumDeviceDrivers @ stdcall EnumDeviceDrivers(ptr long ptr)
@ stdcall EnumDynamicTimeZoneInformation(long ptr) @ stdcall EnumDynamicTimeZoneInformation(long ptr)
@ stdcall EnumLanguageGroupLocalesW(ptr long long ptr) @ stdcall EnumLanguageGroupLocalesW(ptr long long ptr)
# @ stub EnumPageFilesA @ stdcall EnumPageFilesA(ptr ptr)
# @ stub EnumPageFilesW @ stdcall EnumPageFilesW(ptr ptr)
# @ stub EnumProcessModules @ stdcall EnumProcessModules(long ptr long ptr)
# @ stub EnumProcessModulesEx @ stdcall EnumProcessModulesEx(long ptr long ptr long)
# @ stub EnumProcesses @ stdcall EnumProcesses(ptr long ptr)
@ stdcall EnumResourceLanguagesExA(long str str ptr long long long) @ stdcall EnumResourceLanguagesExA(long str str ptr long long long)
@ stdcall EnumResourceLanguagesExW(long wstr wstr ptr long long long) @ stdcall EnumResourceLanguagesExW(long wstr wstr ptr long long long)
@ stdcall EnumResourceNamesExA(long str ptr long long long) @ stdcall EnumResourceNamesExA(long str ptr long long long)
@ -477,10 +477,10 @@
@ stdcall GetDateFormatA(long long ptr str ptr long) kernel32.GetDateFormatA @ stdcall GetDateFormatA(long long ptr str ptr long) kernel32.GetDateFormatA
@ stdcall GetDateFormatEx(wstr long ptr wstr ptr long wstr) kernel32.GetDateFormatEx @ stdcall GetDateFormatEx(wstr long ptr wstr ptr long wstr) kernel32.GetDateFormatEx
@ stdcall GetDateFormatW(long long ptr wstr ptr long) kernel32.GetDateFormatW @ stdcall GetDateFormatW(long long ptr wstr ptr long) kernel32.GetDateFormatW
# @ stub GetDeviceDriverBaseNameA @ stdcall GetDeviceDriverBaseNameA(ptr ptr long)
# @ stub GetDeviceDriverBaseNameW @ stdcall GetDeviceDriverBaseNameW(ptr ptr long)
# @ stub GetDeviceDriverFileNameA @ stdcall GetDeviceDriverFileNameA(ptr ptr long)
# @ stub GetDeviceDriverFileNameW @ stdcall GetDeviceDriverFileNameW(ptr ptr long)
@ stdcall GetDiskFreeSpaceA(str ptr ptr ptr ptr) @ stdcall GetDiskFreeSpaceA(str ptr ptr ptr ptr)
@ stdcall GetDiskFreeSpaceExA(str ptr ptr ptr) @ stdcall GetDiskFreeSpaceExA(str ptr ptr ptr)
@ stdcall GetDiskFreeSpaceExW(wstr ptr ptr ptr) @ stdcall GetDiskFreeSpaceExW(wstr ptr ptr ptr)
@ -553,20 +553,20 @@
@ stdcall GetLogicalProcessorInformationEx(long ptr ptr) @ stdcall GetLogicalProcessorInformationEx(long ptr ptr)
@ stdcall GetLongPathNameA(str ptr long) @ stdcall GetLongPathNameA(str ptr long)
@ stdcall GetLongPathNameW(wstr ptr long) @ stdcall GetLongPathNameW(wstr ptr long)
# @ stub GetMappedFileNameA @ stdcall GetMappedFileNameA(long ptr ptr long)
# @ stub GetMappedFileNameW @ stdcall GetMappedFileNameW(long ptr ptr long)
# @ stub GetMemoryErrorHandlingCapabilities # @ stub GetMemoryErrorHandlingCapabilities
# @ stub GetModuleBaseNameA @ stdcall GetModuleBaseNameA(long long ptr long)
# @ stub GetModuleBaseNameW @ stdcall GetModuleBaseNameW(long long ptr long)
@ stdcall GetModuleFileNameA(long ptr long) @ stdcall GetModuleFileNameA(long ptr long)
# @ stub GetModuleFileNameExA @ stdcall GetModuleFileNameExA(long long ptr long)
# @ stub GetModuleFileNameExW @ stdcall GetModuleFileNameExW(long long ptr long)
@ stdcall GetModuleFileNameW(long ptr long) @ stdcall GetModuleFileNameW(long ptr long)
@ stdcall GetModuleHandleA(str) @ stdcall GetModuleHandleA(str)
@ stdcall GetModuleHandleExA(long ptr ptr) @ stdcall GetModuleHandleExA(long ptr ptr)
@ stdcall GetModuleHandleExW(long ptr ptr) @ stdcall GetModuleHandleExW(long ptr ptr)
@ stdcall GetModuleHandleW(wstr) @ stdcall GetModuleHandleW(wstr)
# @ stub GetModuleInformation @ stdcall GetModuleInformation(long long ptr long)
@ stdcall GetNLSVersion(long long ptr) @ stdcall GetNLSVersion(long long ptr)
@ stdcall GetNLSVersionEx(long wstr ptr) @ stdcall GetNLSVersionEx(long wstr ptr)
@ stub GetNamedLocaleHashNode @ stub GetNamedLocaleHashNode
@ -615,7 +615,7 @@
# @ stub GetPackageTargetPlatformProperty # @ stub GetPackageTargetPlatformProperty
# @ stub GetPackageVolumeSisPath # @ stub GetPackageVolumeSisPath
# @ stub GetPackagesByPackageFamily # @ stub GetPackagesByPackageFamily
# @ stub GetPerformanceInfo @ stdcall GetPerformanceInfo(ptr long)
@ stdcall GetPhysicallyInstalledSystemMemory(ptr) @ stdcall GetPhysicallyInstalledSystemMemory(ptr)
# @ stub GetPreviousFgPolicyRefreshInfoInternal # @ stub GetPreviousFgPolicyRefreshInfoInternal
@ stdcall GetPriorityClass(long) @ stdcall GetPriorityClass(long)
@ -629,10 +629,10 @@
@ stdcall -import GetProcessHeaps(long ptr) RtlGetProcessHeaps @ stdcall -import GetProcessHeaps(long ptr) RtlGetProcessHeaps
@ stdcall GetProcessId(long) @ stdcall GetProcessId(long)
@ stdcall GetProcessIdOfThread(long) @ stdcall GetProcessIdOfThread(long)
# @ stub GetProcessImageFileNameA @ stdcall GetProcessImageFileNameA(long ptr long)
# @ stub GetProcessImageFileNameW @ stdcall GetProcessImageFileNameW(long ptr long)
# @ stub GetProcessInformation # @ stub GetProcessInformation
# @ stub GetProcessMemoryInfo @ stdcall GetProcessMemoryInfo(long ptr long)
@ stdcall GetProcessMitigationPolicy(long long ptr long) @ stdcall GetProcessMitigationPolicy(long long ptr long)
@ stdcall GetProcessPreferredUILanguages(long ptr ptr ptr) @ stdcall GetProcessPreferredUILanguages(long ptr ptr ptr)
@ stdcall GetProcessPriorityBoost(long ptr) @ stdcall GetProcessPriorityBoost(long ptr)
@ -764,8 +764,8 @@
@ stdcall GetWindowsDirectoryA(ptr long) @ stdcall GetWindowsDirectoryA(ptr long)
@ stdcall GetWindowsDirectoryW(ptr long) @ stdcall GetWindowsDirectoryW(ptr long)
@ stdcall GetWriteWatch(long ptr long ptr ptr ptr) @ stdcall GetWriteWatch(long ptr long ptr ptr ptr)
# @ stub GetWsChanges @ stdcall GetWsChanges(long ptr long)
# @ stub GetWsChangesEx @ stdcall GetWsChangesEx(long ptr ptr)
@ stdcall -arch=i386,x86_64 GetXStateFeaturesMask(ptr ptr) @ stdcall -arch=i386,x86_64 GetXStateFeaturesMask(ptr ptr)
@ stdcall GlobalAlloc(long long) @ stdcall GlobalAlloc(long long)
@ stdcall GlobalFree(long) @ stdcall GlobalFree(long)
@ -808,7 +808,7 @@
@ stdcall InitializeCriticalSectionEx(ptr long long) @ stdcall InitializeCriticalSectionEx(ptr long long)
# @ stub InitializeEnclave # @ stub InitializeEnclave
@ stdcall InitializeProcThreadAttributeList(ptr long long ptr) @ stdcall InitializeProcThreadAttributeList(ptr long long ptr)
# @ stub InitializeProcessForWsWatch @ stdcall InitializeProcessForWsWatch(long)
@ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead @ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead
@ stdcall InitializeSRWLock(ptr) ntdll.RtlInitializeSRWLock @ stdcall InitializeSRWLock(ptr) ntdll.RtlInitializeSRWLock
@ stdcall InitializeSecurityDescriptor(ptr long) @ stdcall InitializeSecurityDescriptor(ptr long)
@ -888,33 +888,33 @@
@ stdcall IsWellKnownSid(ptr long) @ stdcall IsWellKnownSid(ptr long)
@ stdcall IsWow64Process(ptr ptr) @ stdcall IsWow64Process(ptr ptr)
@ stdcall IsWow64Process2(ptr ptr ptr) @ stdcall IsWow64Process2(ptr ptr ptr)
@ stdcall K32EmptyWorkingSet(long) @ stdcall K32EmptyWorkingSet(long) EmptyWorkingSet
@ stdcall K32EnumDeviceDrivers(ptr long ptr) @ stdcall K32EnumDeviceDrivers(ptr long ptr) EnumDeviceDrivers
@ stdcall K32EnumPageFilesA(ptr ptr) @ stdcall K32EnumPageFilesA(ptr ptr) EnumPageFilesA
@ stdcall K32EnumPageFilesW(ptr ptr) @ stdcall K32EnumPageFilesW(ptr ptr) EnumPageFilesW
@ stdcall K32EnumProcessModules(long ptr long ptr) @ stdcall K32EnumProcessModules(long ptr long ptr) EnumProcessModules
@ stdcall K32EnumProcessModulesEx(long ptr long ptr long) @ stdcall K32EnumProcessModulesEx(long ptr long ptr long) EnumProcessModulesEx
@ stdcall K32EnumProcesses(ptr long ptr) @ stdcall K32EnumProcesses(ptr long ptr) EnumProcesses
@ stdcall K32GetDeviceDriverBaseNameA(ptr ptr long) @ stdcall K32GetDeviceDriverBaseNameA(ptr ptr long) GetDeviceDriverBaseNameA
@ stdcall K32GetDeviceDriverBaseNameW(ptr ptr long) @ stdcall K32GetDeviceDriverBaseNameW(ptr ptr long) GetDeviceDriverBaseNameW
@ stdcall K32GetDeviceDriverFileNameA(ptr ptr long) @ stdcall K32GetDeviceDriverFileNameA(ptr ptr long) GetDeviceDriverFileNameA
@ stdcall K32GetDeviceDriverFileNameW(ptr ptr long) @ stdcall K32GetDeviceDriverFileNameW(ptr ptr long) GetDeviceDriverFileNameW
@ stdcall K32GetMappedFileNameA(long ptr ptr long) @ stdcall K32GetMappedFileNameA(long ptr ptr long) GetMappedFileNameA
@ stdcall K32GetMappedFileNameW(long ptr ptr long) @ stdcall K32GetMappedFileNameW(long ptr ptr long) GetMappedFileNameW
@ stdcall K32GetModuleBaseNameA(long long ptr long) @ stdcall K32GetModuleBaseNameA(long long ptr long) GetModuleBaseNameA
@ stdcall K32GetModuleBaseNameW(long long ptr long) @ stdcall K32GetModuleBaseNameW(long long ptr long) GetModuleBaseNameW
@ stdcall K32GetModuleFileNameExA(long long ptr long) @ stdcall K32GetModuleFileNameExA(long long ptr long) GetModuleFileNameExA
@ stdcall K32GetModuleFileNameExW(long long ptr long) @ stdcall K32GetModuleFileNameExW(long long ptr long) GetModuleFileNameExW
@ stdcall K32GetModuleInformation(long long ptr long) @ stdcall K32GetModuleInformation(long long ptr long) GetModuleInformation
@ stdcall K32GetPerformanceInfo(ptr long) @ stdcall K32GetPerformanceInfo(ptr long) GetPerformanceInfo
@ stdcall K32GetProcessImageFileNameA(long ptr long) @ stdcall K32GetProcessImageFileNameA(long ptr long) GetProcessImageFileNameA
@ stdcall K32GetProcessImageFileNameW(long ptr long) @ stdcall K32GetProcessImageFileNameW(long ptr long) GetProcessImageFileNameW
@ stdcall K32GetProcessMemoryInfo(long ptr long) @ stdcall K32GetProcessMemoryInfo(long ptr long) GetProcessMemoryInfo
@ stdcall K32GetWsChanges(long ptr long) @ stdcall K32GetWsChanges(long ptr long) GetWsChanges
@ stdcall K32GetWsChangesEx(long ptr ptr) @ stdcall K32GetWsChangesEx(long ptr ptr) GetWsChangesEx
@ stdcall K32InitializeProcessForWsWatch(long) @ stdcall K32InitializeProcessForWsWatch(long) InitializeProcessForWsWatch
@ stdcall K32QueryWorkingSet(long ptr long) @ stdcall K32QueryWorkingSet(long ptr long) QueryWorkingSet
@ stdcall K32QueryWorkingSetEx(long ptr long) @ stdcall K32QueryWorkingSetEx(long ptr long) QueryWorkingSetEx
@ stub KernelBaseGetGlobalData @ stub KernelBaseGetGlobalData
@ stdcall LCIDToLocaleName(long ptr long long) @ stdcall LCIDToLocaleName(long ptr long long)
@ stdcall LCMapStringA(long long str long ptr long) @ stdcall LCMapStringA(long long str long ptr long)
@ -1220,8 +1220,8 @@
@ stdcall QueryUnbiasedInterruptTime(ptr) ntdll.RtlQueryUnbiasedInterruptTime @ stdcall QueryUnbiasedInterruptTime(ptr) ntdll.RtlQueryUnbiasedInterruptTime
# @ stub QueryUnbiasedInterruptTimePrecise # @ stub QueryUnbiasedInterruptTimePrecise
# @ stub QueryVirtualMemoryInformation # @ stub QueryVirtualMemoryInformation
# @ stub QueryWorkingSet @ stdcall QueryWorkingSet(long ptr long)
# @ stub QueryWorkingSetEx @ stdcall QueryWorkingSetEx(long ptr long)
@ stdcall QueueUserAPC(ptr long long) @ stdcall QueueUserAPC(ptr long long)
@ stdcall QueueUserWorkItem(ptr ptr long) @ stdcall QueueUserWorkItem(ptr ptr long)
# @ stub QuirkGetData # @ stub QuirkGetData