Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Machine Info

Machine Info

Scheduled Pinned Locked Moved C#
questionjson
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Moon Boy
    wrote on last edited by
    #1

    Hey. How can i get the total machine RAM, ram used, etc? Api? Thanks.

    E M H 3 Replies Last reply
    0
    • M Moon Boy

      Hey. How can i get the total machine RAM, ram used, etc? Api? Thanks.

      E Offline
      E Offline
      eggie5
      wrote on last edited by
      #2

      using System.Management and then a PerformanceCounter This is how I did it once... (Free Memory)

      	public int GetAvailableMemory()
      	{ 
      		PerformanceCounter ramCounter;
      		ramCounter = new PerformanceCounter("Memory", "Available MBytes"); 
      
      		int a=Convert.ToInt32(ramCounter.NextValue());
      
      		return a;
      	} 
      

      /\ |_ E X E GG

      1 Reply Last reply
      0
      • M Moon Boy

        Hey. How can i get the total machine RAM, ram used, etc? Api? Thanks.

        M Offline
        M Offline
        Mazdak
        wrote on last edited by
        #3

        Also look for WMI articles in C# section in this site for other solution. Mazy
        "One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji

        1 Reply Last reply
        0
        • M Moon Boy

          Hey. How can i get the total machine RAM, ram used, etc? Api? Thanks.

          H Offline
          H Offline
          heile
          wrote on last edited by
          #4

          Maybe try checking the Environment Values. I think you can access them using the System.Environment namespace. It gives you access to all sorts of info, like OS version, current directory, and WorkingSet(I think this is mach ram). Hope this helps :cool:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups