GlobalMemoryStatusEx function (Win32 API)
#include <iostream>
#include <windows.h>
int main()
{
MEMORYSTATUSEX statusEx;
statusEx.dwLength = sizeof(statusEx);
GlobalMemoryStatusEx(&statusEx);
unsigned long long totalMem = statusEx.ullTotalPhys;
std::cout << totalMem;
return 0;
}
Leave a Comment
Cancel reply