title: How to query the thread count of a process using the regular Windows C/C++ APIs
body: <p>Is there a way to query the number of threads that are currently running for a specific process using the standard Windows C/C++ APIs?</p>
  
  <p>I already prowled through the MSDN docs but the only thing that comes near is</p>
  
  <pre><code>BOOL WINAPI GetProcessHandleCount(
    __in     HANDLE hProcess,
    __inout  PDWORD pdwHandleCount
  );
  </code></pre>
  
  <p>which queries the number of system handles currently in use by a given process, which will include thread handles, but will not be limited to them.</p>
  
  <p>Any insights would be greatly appreciated.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Bjoern</p>