views:

350

answers:

2

How can I enumerate all of the threads in a process given a HANDLE to the process (or a process ID)? I'm interested in doing this so I can further do an EnumThreadWindows on each thread.

+1  A: 

The ToolHelp library gives an API for snapshotting processes and enumerating their threads (amongst other properties). See MSDN for details.

Steve Gilham
+2  A: 

Enumerating threads in a process at MSDN Blogs

nik
Perfect, thanks!
bdonlan