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. Database & SysAdmin
  3. System Admin
  4. getting handles and thread count for a process

getting handles and thread count for a process

Scheduled Pinned Locked Moved System Admin
c++performancehelptutorialquestion
4 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.
  • A Offline
    A Offline
    Aditya Gupta
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • A Aditya Gupta

      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

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      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.

      A 1 Reply Last reply
      0
      • A Anonymous

        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.

        A Offline
        A Offline
        Aditya Gupta
        wrote on last edited by
        #3

        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

        C 1 Reply Last reply
        0
        • A Aditya Gupta

          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

          C Offline
          C Offline
          Chris Richardson
          wrote on last edited by
          #4

          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

          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