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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to retreive RAM size

How to retreive RAM size

Scheduled Pinned Locked Moved C#
csharptutorialquestion
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.
  • P Offline
    P Offline
    Phanindra Kumar
    wrote on last edited by
    #1

    Hi, How can I retreive RAM size of my computer through c# program. Thanks in Advance

    Phanindra...

    L V N 3 Replies Last reply
    0
    • P Phanindra Kumar

      Hi, How can I retreive RAM size of my computer through c# program. Thanks in Advance

      Phanindra...

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, I use P/Invoke and call GlobalMemoryStatus() from kernel32.dll to get that. It returns a struct, the dwTotalPhys field is what you want. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


      1 Reply Last reply
      0
      • P Phanindra Kumar

        Hi, How can I retreive RAM size of my computer through c# program. Thanks in Advance

        Phanindra...

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        http://www.csharphelp.com/archives2/archive334.html[^]

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        1 Reply Last reply
        0
        • P Phanindra Kumar

          Hi, How can I retreive RAM size of my computer through c# program. Thanks in Advance

          Phanindra...

          N Offline
          N Offline
          Nouman Bhatti
          wrote on last edited by
          #4

          The GlobalMemoryStatus function retrieves information about current available memory. The function returns information about both physical and virtual memory. This function supersedes the GetFreeSpace function. P.S. For these kind of function u can use API-Guide a good software

          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