kernel32: Implement stub for GetPhysicallyInstalledSystemMemory.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2015-10-19 12:41:48 +02:00 committed by Alexandre Julliard
parent 16a97953c0
commit 966827bbc1
4 changed files with 24 additions and 3 deletions

View File

@ -7,7 +7,7 @@
@ stdcall GetLogicalProcessorInformationEx(long ptr ptr) kernel32.GetLogicalProcessorInformationEx @ stdcall GetLogicalProcessorInformationEx(long ptr ptr) kernel32.GetLogicalProcessorInformationEx
@ stdcall GetNativeSystemInfo(ptr) kernel32.GetNativeSystemInfo @ stdcall GetNativeSystemInfo(ptr) kernel32.GetNativeSystemInfo
@ stub GetOsSafeBootMode @ stub GetOsSafeBootMode
@ stub GetPhysicallyInstalledSystemMemory @ stdcall GetPhysicallyInstalledSystemMemory(ptr) kernel32.GetPhysicallyInstalledSystemMemory
@ stdcall GetProductInfo(long long long long ptr) kernel32.GetProductInfo @ stdcall GetProductInfo(long long long long ptr) kernel32.GetProductInfo
@ stdcall GetSystemDirectoryA(ptr long) kernel32.GetSystemDirectoryA @ stdcall GetSystemDirectoryA(ptr long) kernel32.GetSystemDirectoryA
@ stdcall GetSystemDirectoryW(ptr long) kernel32.GetSystemDirectoryW @ stdcall GetSystemDirectoryW(ptr long) kernel32.GetSystemDirectoryW

View File

@ -1449,6 +1449,27 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
lpBuffer->dwTotalVirtual, lpBuffer->dwAvailVirtual ); lpBuffer->dwTotalVirtual, lpBuffer->dwAvailVirtual );
} }
/***********************************************************************
* GetPhysicallyInstalledSystemMemory (KERNEL32.@)
*/
BOOL WINAPI GetPhysicallyInstalledSystemMemory(ULONGLONG *total_memory)
{
MEMORYSTATUSEX memstatus;
FIXME("stub: %p\n", total_memory);
if (!total_memory)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
memstatus.dwLength = sizeof(memstatus);
GlobalMemoryStatusEx(&memstatus);
*total_memory = memstatus.ullTotalPhys / 1024;
return TRUE;
}
BOOL WINAPI GetSystemFileCacheSize(PSIZE_T mincache, PSIZE_T maxcache, PDWORD flags) BOOL WINAPI GetSystemFileCacheSize(PSIZE_T mincache, PSIZE_T maxcache, PDWORD flags)
{ {
FIXME("stub: %p %p %p\n", mincache, maxcache, flags); FIXME("stub: %p %p %p\n", mincache, maxcache, flags);

View File

@ -759,7 +759,7 @@
@ stdcall GetOEMCP() @ stdcall GetOEMCP()
@ stdcall GetOverlappedResult(long ptr ptr long) @ stdcall GetOverlappedResult(long ptr ptr long)
@ stdcall GetUserPreferredUILanguages(long ptr ptr ptr) @ stdcall GetUserPreferredUILanguages(long ptr ptr ptr)
# @ stub GetPhysicallyInstalledSystemMemory @ stdcall GetPhysicallyInstalledSystemMemory(ptr)
@ stdcall GetPriorityClass(long) @ stdcall GetPriorityClass(long)
@ stdcall GetPrivateProfileIntA(str str long str) @ stdcall GetPrivateProfileIntA(str str long str)
@ stdcall GetPrivateProfileIntW(wstr wstr long wstr) @ stdcall GetPrivateProfileIntW(wstr wstr long wstr)

View File

@ -1156,7 +1156,7 @@ static void test_GetPhysicallyInstalledSystemMemory(void)
pGetPhysicallyInstalledSystemMemory = (void *)GetProcAddress(kernel32, "GetPhysicallyInstalledSystemMemory"); pGetPhysicallyInstalledSystemMemory = (void *)GetProcAddress(kernel32, "GetPhysicallyInstalledSystemMemory");
if (!pGetPhysicallyInstalledSystemMemory) if (!pGetPhysicallyInstalledSystemMemory)
{ {
skip("GetPhysicallyInstalledSystemMemory is not available\n"); win_skip("GetPhysicallyInstalledSystemMemory is not available\n");
return; return;
} }