Getting amount of total physical memory

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MichaÅ‚ Januszczyk

    Getting amount of total physical memory

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

    Thanks in advanc
    Michał Januszczyk
  • Eric Cherng

    #2
    Re: Getting amount of total physical memory

    Michal,

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



    "Michal Januszczyk" <anonymous@disc ussions.microso ft.com> wrote in message
    news:9B03D7CC-B58B-4FC1-A6C7-C774D67A7A96@mi crosoft.com...[color=blue]
    > Is there any _managed_ way of getting total physical
    > memory installed in the machine ?
    >
    > Thanks in advance
    > Michal Januszczyk[/color]


    Comment

    • MichaÅ‚ Januszczyk

      #3
      Re: Getting amount of total physical memory


      ----- 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




      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

      Comment

      Working...