Module: wine Branch: master Commit: 966827bbc1fc49980a0367ea1a4908294fafe4fe URL: http://source.winehq.org/git/wine.git/?a=commit;h=966827bbc1fc49980a0367ea1a...
Author: Sebastian Lackner sebastian@fds-team.de Date: Mon Oct 19 12:41:48 2015 +0200
kernel32: Implement stub for GetPhysicallyInstalledSystemMemory.
Signed-off-by: Sebastian Lackner sebastian@fds-team.de Signed-off-by: Alexandre Julliard julliard@winehq.org
---
.../api-ms-win-core-sysinfo-l1-2-1.spec | 2 +- dlls/kernel32/heap.c | 21 +++++++++++++++++++++ dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/tests/heap.c | 2 +- 4 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec b/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec index 018ab05..6da2f25 100644 --- a/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec +++ b/dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec @@ -7,7 +7,7 @@ @ stdcall GetLogicalProcessorInformationEx(long ptr ptr) kernel32.GetLogicalProcessorInformationEx @ stdcall GetNativeSystemInfo(ptr) kernel32.GetNativeSystemInfo @ stub GetOsSafeBootMode -@ stub GetPhysicallyInstalledSystemMemory +@ stdcall GetPhysicallyInstalledSystemMemory(ptr) kernel32.GetPhysicallyInstalledSystemMemory @ stdcall GetProductInfo(long long long long ptr) kernel32.GetProductInfo @ stdcall GetSystemDirectoryA(ptr long) kernel32.GetSystemDirectoryA @ stdcall GetSystemDirectoryW(ptr long) kernel32.GetSystemDirectoryW diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c index cac73ec..0286d82 100644 --- a/dlls/kernel32/heap.c +++ b/dlls/kernel32/heap.c @@ -1449,6 +1449,27 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer ) 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) { FIXME("stub: %p %p %p\n", mincache, maxcache, flags); diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index dfc305b..d7eab83 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -759,7 +759,7 @@ @ stdcall GetOEMCP() @ stdcall GetOverlappedResult(long ptr ptr long) @ stdcall GetUserPreferredUILanguages(long ptr ptr ptr) -# @ stub GetPhysicallyInstalledSystemMemory +@ stdcall GetPhysicallyInstalledSystemMemory(ptr) @ stdcall GetPriorityClass(long) @ stdcall GetPrivateProfileIntA(str str long str) @ stdcall GetPrivateProfileIntW(wstr wstr long wstr) diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index 136d618..b656dc2 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -1156,7 +1156,7 @@ static void test_GetPhysicallyInstalledSystemMemory(void) pGetPhysicallyInstalledSystemMemory = (void *)GetProcAddress(kernel32, "GetPhysicallyInstalledSystemMemory"); if (!pGetPhysicallyInstalledSystemMemory) { - skip("GetPhysicallyInstalledSystemMemory is not available\n"); + win_skip("GetPhysicallyInstalledSystemMemory is not available\n"); return; }