Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Amount of RAM?
Message
De
19/06/2008 22:47:41
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
 
 
À
19/06/2008 18:17:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01325584
Message ID:
01325638
Vues:
53
This message has been marked as the solution to the initial question of the thread.
You can use this API... it returns the same results you see in the Windows Task Manager
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
>When I right mouse click on My Computer on the General tab I see that I have 1.50 GB of RAM installed. How can I get that information via an API or other method? The MEMORY() and some other SYS() functions did not return the information I desire.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform