
How can I tell amount of RAM installed
In article
Quote:
erox.com>,
(Christopher McKechney) threw
this at us:
Quote:
something that I can use to tell
how much RAM a
Quote:
>>user have on there machine?? I
can tell free memory/total memory
but
Quote:
>>that includes swapfile space.
If you are using Windows NT or 95
you could try the
GlobalMemoryStatus API
I believe it is a Sub
'In Bas Mod
Type udt_lpmstMemStat
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
Declare Sub
GlobalMemoryStatus Lib "kernel32"
(lpBuffer As MEMORYSTATUS)
Private Sub Command1_click()
Dim
AvailablePhysicalMemory as Long
Dim lpmstMemStat as
udt_lpmstMemStat
Call
GlobalMemoryStatus(lpmstMemStat)
AvailablePhysicalMemory =
lpmstMemStat.dwAvailPhys
MsgBox
Str(AvailablePhysicalMemory)
End Sub
I have no idea if this works, I
only have the C API's on hand so
Good Luck.