title: How to get the main thread ID of a process (known by its ID)?
body: <p>Can you help me to find the main (only) thread ID of a given by ID process, please ?  </p>
  
  <p>Task context:
  A running process has (at the moment) no windows but a(some) thread(s).</p>
  
  <p>Wanted:
  Posting of <code>WM_QUIT</code> at the main thread only.</p>
  
  <p>Not-wanted:
  Using of <code>TerminateProcess</code> or posting <code>WM_QUIT</code> at the non-primary threads.</p>