>* Simulate MEMORYSTATUS structure >lcmemstatus = SPACE(32) >* Declare the function >DECLARE GlobalMemoryStatus IN Win32API; > STRING @lpBuffer >= GlobalMemoryStatus(@lcmemstatus) >* Total Physical Memory is in bytes 9-12 >lctotalmem = SUBSTR(lcmemstatus, 9, 4)>Once this is done you'll need to covert the above portion of the string to a numeric value. Something like this:
>lnresult = 0 >FOR lni = 1 TO 4 > lnresult = lnresult + ASC(SUBSTR(lctotalmem, lni, 1)) * (256 ^ (lni - 1)) >NEXT>lnresult will accurately contain the number of bytes in installed memory.