Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

For LUCKY LUKE 1

Status
Not open for further replies.

aaaaaaaaaaaa

Programmer
Aug 4, 2001
25
IN
Yes i mean that only(ram,virtual memory,physical memory..etc etc).....
If you have done this....then please give the example how u have done this...
Since when i am trying this it is giving error..
 
Well, I know that you wanted Lucky Luke to answer this, but I give you some info on it. Here is the code for using the GlobalMemoryStatus . . .

Code:
Option Explicit
Private Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As MEMORYSTATUS)
Private Type MEMORYSTATUS
        dwLength As Long
        dwMemoryLoad As Long
        dwTotalPhys As Long
        dwAvailPhys As Long
        dwTotalPageFile As Long
        dwAvailPageFile As Long
        dwTotalVirtual As Long
        dwAvailVirtual As Long
End Type

Private Sub Command1_Click()

   Dim udtMemeStat As MEMORYSTATUS
   Call GlobalMemoryStatus(udtMemeStat)
   

End Sub


The UDT will return multiple values . . . they are as follows . . .

Code:
dwLength        = Sizeof the memory status data UDT
dwMemoryLoad    = Percent of memory in use.
dwTotalPhys     = Total bytes of physical mem
dwAvailPhys     = Total bytes of physical mem in use.
dwTotalPageFile = Bytes of paging file (i.e. swap file)
dwAvailPageFile = Free space in paging file.
dwTotalVirtual  = User bytes of address space
dwAvailVirtual  = Free User bytes.


There are alot of other memory function/APIs that I have used in the past . . . is this the one that you were asking about? Also, how are you using it and what error are you getting? - Jeff Marler B-)
 
Hi,

It is exactly as Jeff says, so thats why I didn't respond. You don't have to make a new thread if you want a new reply, since we actually will look into the thread again ;-)

LuCkY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top