How to get Thread ID?

Nov 25, 2011 at 6:31am
hi. I want to get a thread ID of a process.
All I know is HANDLE of a process.
Can I get thread Id by using the HANDLE??
For Instance, run "Notepad" and get that handle.
Also, get the Thread ID of it.
Is it possible??
Nov 25, 2011 at 8:30am
So you have the Process ID. Use the win32 toolhelp lib to enumerate the threads for a process. From retreived threads you can know (By looking its property) whether it is main thread for the process or not.
Topic archived. No new replies allowed.