DECLARE GlobalMemoryStatus IN Win32API; STRING @lpMemstatus lcmemstatus = IntegerToString(32) + REPLICATE(CHR(0), 28) = GlobalMemoryStatus(@lcmemstatus) lnPctFree = StringToInteger(SUBSTR(lcmemstatus, 5, 4)) && Pct. Free lnTotalPhys = StringToInteger(SUBSTR(lcmemstatus, 9, 4)) && Total Physical lnFreePhys = StringToInteger(SUBSTR(lcmemstatus, 13, 4)) && Free Physical lnbytespage = StringToInteger(SUBSTR(lcmemstatus, 17, 4)) && Bytes of Paging File lnfreepage = StringToInteger(SUBSTR(lcmemstatus, 21, 4)) && free bytes of Paging File lnuserbytes = StringToInteger(SUBSTR(lcmemstatus, 25, 4)) && Total user bytes lnfreeuser = StringToInteger(SUBSTR(lcmemstatus, 29)) && Free user bytes FUNCTION IntegerToString LPARAMETER pnInteger, pnbytes LOCAL lcresult, lnbytes, lnmask,; lninteger, lni, lnchar lcresult = "" IF PCOUNT() = 2 lnbytes = pnbytes ELSE * Default to DWORD lnbytes = 4 ENDIF lninteger = pnInteger lnmask = 255 FOR lni = 1 TO lnbytes lnchar = BITAND(lninteger, lnmask) lcresult = lcresult + CHR(lnchar) lninteger = BITRSHIFT(lninteger, 8) NEXT RETURN lcresult ENDFUNC FUNCTION StringToInteger LPARAMETER pcstring, plsigned LOCAL lnresult, lnlast, lni, llsigned,; lnmsb, lnmax lnresult = 0 lnlast = LEN(pcstring) * Return Signed Integer? IF PCOUNT() = 2 llsigned = plsigned ELSE llsigned = .F. ENDIF FOR lni = 1 TO lnlast lnresult = lnresult + ASC(SUBSTR(pcstring, lni, 1)) * (256 ^ (lni - 1)) NEXT IF llsigned lnmsb = (lnlast * 8) - 1 IF BITTEST(lnresult, lnmsb) lnmax = (2 ^ (lnmsb + 1)) lnresult = lnresult - lnmax ENDIF ENDIF RETURN lnresult ENDFUNChth,