How can I tell amount of RAM installed 
Author Message
 How can I tell amount of RAM installed

Is there a API call or something that I can use to tell how much RAM a
user have on there machine??  I can tell free memory/total memory but
that includes swapfile space.

Thanks,

Christopher McKechney
Advanced Systems Engineer, EDS



Sat, 23 May 1998 03:00:00 GMT  
 How can I tell amount of RAM installed


Quote:
>Is there a API call or something that I can use to tell how much RAM a
>user have on there machine??  I can tell free memory/total memory but
>that includes swapfile space.

If you can't find anything that will do that, just use the value you
have (total RAM including the swap file), then get the value
SwapFileSize from SYSTEM.INI under [386Enh] and subtract. Easy, isn't
it?

Jens
--
* Everything I said are the opinions of someone else.   *
* I just cut-and-pasted.                                *

Jens Balchen jr.



Sun, 24 May 1998 03:00:00 GMT  
 How can I tell amount of RAM installed
In article


Quote:

>In article


erox.com>,
(Christopher McKechney) threw
this at us:
Quote:

>>Is there a API call or

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.



Thu, 28 May 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Determining amount of Ram.

2. Obtaining RAM amount and Disk Space from a remote computer

3. Amount of free RAM

4. Determining amount of Ram - (GetFreeSpace)

5. Determining amount of Ram

6. VB3 - How to determine amount of physical ram

7. Detecting amount of RAM

8. Amount of ram used by embedded VB program using inclueded db engine

9. How can I tell the amount of RAM being used by VB App?

10. API call to find Ram Installed in Windows.

11. Real RAM Installed?

12. "Out of Memory" Errors with Large Amounts of RAM Installed

 

 
Powered by phpBB® Forum Software