Am using the following code to get total physical memory in QB64.
How do I get the total physical memory of the graphics adapter?
Contents of MEM.H
#include<windows.h>
#include<stdio.h>
#include<tchar.h>
uint64 TotalPhysicalMem ();
uint64 TotalPhysicalMem () {
MEMORYSTATUSEX statex;
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
return statex.ullTotalPhys;
}
Contents of MEM.BAS
REM Mem.bas source:
DECLARE LIBRARY "mem"
FUNCTION TotalPhysicalMem~&&
END DECLARE
PRINT "Total Physical Memory: "
PRINT TotalPhysicalMem
END