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??
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.