getting handles and thread count for a process
-
Can anyone help me getting information regarding the handles and threads count for a process on WinNT/win2k/WinXP platform. I need to get this infomration using c/c++ code just like the values which are shown in TaskManager. I could get information about CPU utilisation using performance counters. But how to go about the handles and threads?? Addy
-
Can anyone help me getting information regarding the handles and threads count for a process on WinNT/win2k/WinXP platform. I need to get this infomration using c/c++ code just like the values which are shown in TaskManager. I could get information about CPU utilisation using performance counters. But how to go about the handles and threads?? Addy
-
You can get the handle and thread counts using performance counters (at least with PDH). You just have to have the right name for the performance object, which is easy to find using perfmon.
Tnx for the info , I will be really thankful if you could put some more light on this and elaborate. How can I get the names for the performance objects? Addy
-
Tnx for the info , I will be really thankful if you could put some more light on this and elaborate. How can I get the names for the performance objects? Addy
Sorry my other post was anonymous (I accidentally wasn't logged in)... If you would like to find the names of the performance objects, click the Start Menu, then click Run, then type "perfmon". Now, you will see the performance monitor program. From here, you can click the "+" toolbar icon, and it will show you counters and all sorts of other information. You can even see a description of what each counter is actually counting. For a description of the naming scheme, check here[^]. If you'd like to take a look at the APIs required to do this, I would start here: http://msdn.microsoft.com/library/en-us/perfmon/base/about_performance_monitoring.asp[^] Chris Richardson Programmers find all sorts of ingenious ways to screw ourselves over. - Tim Smith