Getting amount of total physical memory

G

Guest

Is there any _managed_ way of getting total physical
memory installed in the machine

Thanks in advanc
Michał Januszczyk
 
G

Guest

----- Eric Cherng wrote: ----

Michal

You can retrieve the amount of physical memory on the computer by using WMI
A quick google search returned this page

http://www.dotnet247.com/247reference/msgs/24/123208.asp


Thank You very much. This works fine on my machine, however I ran this on VMWare with 140 MB of memor
and this did not return valid numbers. Memory was returned twice (the program uses internally a loop):
it showed 50 MB and 33 MB, when it should return ony one number (140MB).
XP installed on the virtual machine (task manager, My Computer Properties,...) is aware of 140MB
Later I increased memory for VMachine to 240 MB, and then WMI returned 67MB (also twice

I hope that this is related to VMWare and all physicall machines would behave normally.

Thank You
Michal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top