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

admin / May 16th, 2011/ Posted in Software / No Comments »

Q: If I know the name of the process, what should I do to find out how much RAM is a process using the system using an app that I create in C #? Im having trouble thinking of how this word to help me:)


Best Answer: Sounds like the MB is OK.
I would start by checking the BIOS, and maybe resetting it to default values. It may be that some of the settings were altered by the "incident".
Next I would go to the device manager, and if any of the devices are in conflict, uninstalling them, then re-installing them, and let Windows detect them again. This may remove the conflicts, if any.
Good luck!

Re:The System.Diagnostics.Process class is your friend.

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


Re: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++.


Re:I know taskmanager can do it. I am trying to do something slick internal to this program I am making though. I found this on MSDN http://msdn.microsoft.com/library/defau…ry_usage_information_for_a_process.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/collecting_memory_usage_information_for_a_process. asp) not sure if this will work yet

Re:Windows task manager shows the ram per task.

Im sure there is simple API call that will return an integer.


Related posts


Tags: ,

Leave a Reply

Name required

Mail (will not be published) required

Website