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 enumerate all thread handles?

How to enumerate all thread handles?

Scheduled Pinned Locked Moved C / C++ / MFC
performancec++javajsontutorial
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.
  • S Offline
    S Offline
    Stephen Kellett
    wrote on last edited by
    #1

    Does anyone know how to get a list of all the thread handles in a process on Windows NT4.0? On Windows 2000 and Windows XP the toolhelp32 api can be used, but this is not available on Windows NT 4.0. Also the process status helper library (PSAPI) has a function to enumerate all processes, but not all threads. Note, I am interested in the thread handles, not the thread ids as I don't know of a way to get a thread handle if you know a thread id (that works on Windows NT 4.0). Cheers Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.

    J C 2 Replies Last reply
    0
    • S Stephen Kellett

      Does anyone know how to get a list of all the thread handles in a process on Windows NT4.0? On Windows 2000 and Windows XP the toolhelp32 api can be used, but this is not available on Windows NT 4.0. Also the process status helper library (PSAPI) has a function to enumerate all processes, but not all threads. Note, I am interested in the thread handles, not the thread ids as I don't know of a way to get a thread handle if you know a thread id (that works on Windows NT 4.0). Cheers Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.

      J Offline
      J Offline
      Jon Newman
      wrote on last edited by
      #2

      Correct me if i'm wrong here i'm a beginner. Doesn't VC++ 6 have some tools for looking at threads etc... I've been playing around with them myself, however u may be looking for something a bit more techy than them. I hope this will either ring a few bells in your or other visitors heads as to the matter. .NET or not .NET? MFC is the question......

      1 Reply Last reply
      0
      • S Stephen Kellett

        Does anyone know how to get a list of all the thread handles in a process on Windows NT4.0? On Windows 2000 and Windows XP the toolhelp32 api can be used, but this is not available on Windows NT 4.0. Also the process status helper library (PSAPI) has a function to enumerate all processes, but not all threads. Note, I am interested in the thread handles, not the thread ids as I don't know of a way to get a thread handle if you know a thread id (that works on Windows NT 4.0). Cheers Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.

        C Offline
        C Offline
        Carlos Antollini
        wrote on last edited by
        #3

        Use the Spy.... But if you want it prgramatically, for each process, you need to open new enumprocess for each process. The process are a tree, and pspi show you every level, you need to open every process for see if you have more sub process... Best Regards.... :bob: Today is Friday!!! :beer: and Party!!! Carlos Antollini. Sonork ID 100.10529 cantollini

        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