[comp.windows.ms.programmer] total windows memory

rdb@oasis.icl.co.uk (Roger Binns) (04/29/91)

I am having a little problem with Windows 3.  I need to find out how much
memory windows has.  This would be expanded mem + extended mem + base mem +
swap file [maybe minus amount windows kernel uses].

I can't find any function that has this information.  There is one,
GetfreeSpace that tells you the amount of available memory, but not how
much memory there actually is.

I have had a look at the dialog boxes from File Manager and Program Manager
to see what they do.  They call the following functions in the kernel.exe:

GetWinFlags, GetFreeSpace, GetModuleHandle and GetHeapSpaces.

The last one is undocumented.  The dialog box doesn't actually indicate the
amount of memory in the system, but rather the amount of resources.  This
seems to have very loose ties with the amount of actual memory under
windows.

Therefore, I am asking if anyone knows any way of finding out the memory
under windows.

roger binns

===========================================================================
=   rdb@oasis.icl.co.uk                   ICL, Lovelace Road, Bracknell   =
===========================================================================