title: Compare thread IDs using windows api
body: <p>I'm working with windows api threads and I would like to compare thread IDs.</p>
  
  <p>First I create a thread with <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453%28v=vs.85%29.aspx" rel="nofollow">CreateThread()</a> and store the handle( HANDLE ) and ID ( LPDWORD ) that I get from the function. </p>
  
  <p>Then I get the handle and id from the created thread using <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms683182%28v=vs.85%29.aspx" rel="nofollow">GetCurrentThread()</a> and <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms683233%28v=vs.85%29.aspx" rel="nofollow">GetThreadId()</a>.</p>
  
  <p>I always get different values for both handles and both IDs.</p>
  
  <p>Is there a way to compare threads in a similar fashion as pthread?</p>
  
  <p><em>I'm doing this to as a debug option to confirm correct execution. I have always gotten correct results from other libraries( pthread.h, threads.h) but not from windows api. It is not a critical problem but I would like to learn the procedure in winapi</em></p>