SIZE_T ist ein unsigned Int64. Mach mal aus dem Rückgabedatentyp ein Int64. Vergiss es in Delphi ist es ein Cardinal.
Aber wen man sich mal die Hilfe durchliest:
Zitat:
On computers with more than 4 GB of memory, the MEMORYSTATUS structure can return incorrect information. Windows reports a value of -1 to indicate an overflow, while Windows NT reports a value that is the real amount of memory, modulo 4 GB. If your application is at risk for this behavior, use the GlobalMemoryStatusEx function instead of the GlobalMemoryStatus function.