Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pull physical RAM size from Registry?
Message
From
04/10/2002 18:50:18
Fabian Belo
Independent Developer
Argentina
 
 
To
04/10/2002 18:30:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00707985
Message ID:
00707989
Views:
34
This message has been marked as the solution to the initial question of the thread.
More APIs:
DECLARE GlobalMemoryStatus IN kernel32 STRING @ lpBuffer  
      
lpBuffer = REPLI (Chr(0), 250)  
= GlobalMemoryStatus (@lpBuffer)  

= _display ("This buffer length, in bytes ..........:",  1) 
= _display ("Memory in use, % ......................:",  5) 
= _display ("Physical memory, in bytes .............:",  9) 
= _display ("Physical memory available, in bytes ...:", 13) 
= _display ("Committed memory limit, in bytes ......:", 17) 
= _display ("Available memory to commit, in bytes ..:", 21) 
= _display ("User mode portion..., in bytes ........:", 25) 
= _display ("Unreserved/uncommitted memory .........:", 29) 

PROCEDURE  _display (lcCaption, lnOffs) 
    ? lcCaption + TRANS(buf2dword(SUBSTR(lpBuffer,lnOffs,4)),; 
        "999,999,999,999,999,999") 
RETURN 

FUNCTION  buf2dword (lcBuffer) 
RETURN; 
    Asc(SUBSTR(lcBuffer, 1,1)) + ; 
    Asc(SUBSTR(lcBuffer, 2,1)) * 256 +; 
    Asc(SUBSTR(lcBuffer, 3,1)) * 65536 +; 
    Asc(SUBSTR(lcBuffer, 4,1)) * 16777216 
ENDFUNC 
"Since I've read that alcohol is bad... I quit reading."
Me


http://www.fabianbelo.com.ar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform