Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pull physical RAM size from Registry?
Message
De
04/10/2002 18:50:18
Fabian Belo
Independent Developer
Argentine
 
 
À
04/10/2002 18:30:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00707985
Message ID:
00707989
Vues:
36
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform