• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Using C# to read how much memory a process is using

AgentZap

Senior member
If I know the name of the process what would I need to do to read how much RAM a process is using on the system using an app I make in c#? I am having trouble thinking of how to word this for Google to help me 🙂
 
Windows task manager shows the ram per task.

Im sure there is simple API call that will return an integer.
 
WINBASEAPI BOOL WINAPI GetProcessHandleCount(HANDLE,PDWORD);

gets you the the number of handels in the proess.


It should be in WINBASE_H file . Im Using the GCC complier for c++.
 
The System.Diagnostics.Process class is your friend.

The attached code finds the explorer process and tells you how much memory is using.
 
Back
Top