General information
Category:
Windows API functions
>Thanks Borislay, but can you please show me
>how to get total size of RAM ?
* I copied this for somewhere but have never tested it:
* RAM memory routine
clear
local lcmemstatus
lcmemstatus = chr(0)+chr(2)+replicate(chr(0),30)
declare GlobalMemoryStatus in kernel32 string@ lcmemstatus
GlobalMemoryStatus(@lcmemstatus)
? 'Total Physical Memory = ' + transform(DWORDtoNUM(substr(lcmemstatus,9,4))) +' bytes'
? 'Avail Physical Memory = ' + transform(DWORDtoNUM(substr(lcmemstatus,13,4))) +' bytes'
return
function DwordToNum
lparameter tcDWORD
local ln0,ln1,ln2,ln3
ln0=asc(subs(tcDWORD,1,1))
ln1=asc(subs(tcDWORD,2,1)) * (256)
ln2=asc(subs(tcDWORD,3,1)) * (256^2)
ln3=asc(subs(tcDWORD,4,1)) * (256^3)
if ln3+ln2+ln1+ln0 < 2^31 then
return ln3 + ln2 + ln1 + ln0
else
return (-1)*((2^32)-(ln3 + ln2 + ln1 + ln0))
endif
* This works if you have less than 2GB of RAM installed.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only