title: Find all threads of a process given process id
body: <p>I am trying to find if there is a better way to find all thread ids that belong to the current process. It looks like using CreateToolhelp32Snapshot with TH32CS_SNAPTHREAD and iterating over the threads to check if the thread's process id is equal to the current process id, is a solution but i want to avoid iterating all the running threads. I just want to iterate over the threads that belong to a given process. Please let me know if there is an API that is fast and simple. I need to do it in c++.</p>
  
  <p>Thanks,
  Abhinay.</p>