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 / C++ / MFC
  4. How to obtain system memory info (memor consumption, size of free mem space)

How to obtain system memory info (memor consumption, size of free mem space)

Scheduled Pinned Locked Moved C / C++ / MFC
c++performancetutorialquestion
3 Posts 3 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.
  • C Offline
    C Offline
    cy163 hotmail com
    wrote on last edited by
    #1

    Question 1 In my program (a MFC project), how to obtain the status of system memory, say, available mem space, etc. Question 2 How to obtain the ProcessID of my program . I would like to use the ProcessID in the program.

    V D 2 Replies Last reply
    0
    • C cy163 hotmail com

      Question 1 In my program (a MFC project), how to obtain the status of system memory, say, available mem space, etc. Question 2 How to obtain the ProcessID of my program . I would like to use the ProcessID in the program.

      V Offline
      V Offline
      Vinod Sankaranarayanan
      wrote on last edited by
      #2

      Hello, you can use the following function to get the process ID. DWORD GetCurrentProcessId(VOID); The GetCurrentProcessId function returns the process identifier of the calling process. Use the following function to get the System Information, VOID GetSystemInfo( LPSYSTEM_INFO lpSystemInfo // system information ); This function returns information about the current system. Search MSDN , If you want to know more about these functions.

      vinsankar

      1 Reply Last reply
      0
      • C cy163 hotmail com

        Question 1 In my program (a MFC project), how to obtain the status of system memory, say, available mem space, etc. Question 2 How to obtain the ProcessID of my program . I would like to use the ProcessID in the program.

        D Offline
        D Offline
        dpsingh_1
        wrote on last edited by
        #3

        you can use GlobalMemoryStatus for getting info about available mem space

        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