title: WaitForMultipleObjects return value when bWaitAll is TRUE
body: <p>Since some people have different interpretation of the documentation, I'm trying to clarify once and for all the return value of <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms687025(v=vs.85).aspx" rel="nofollow noreferrer">WaitForMultipleObjects </a> when</p>
  <ol>
  <li><code>bWaitAll = TRUE</code>.</li>
  <li><strong>all</strong> handles were signaled</li>
  </ol>
  <p>Based on the documnation:<br/>
  <strong>Return value</strong><br/>
  <em>WAIT_OBJECT_0 to (WAIT_OBJECT_0 + nCount– 1)<br/>
  If bWaitAll is TRUE, the return value indicates that the state of all specified objects is signaled.</em></p>
  <h2>Question</h2>
  <p>Say I have passed 5 handles to this function and <strong>all</strong> of them were signaled, is the return value <code>WAIT_OBJECT_0</code>?</p>
  <h2>Note</h2>
  <p>I'm trying to verify programmatically that <code>WaitForMultipleObjects</code> succeeded.</p>
  <pre><code>DWORD dwWaitForMultipleObjectsRes = WaitForMultipleObjects(dwOpenProcessCount, handles, TRUE, m_dwWaitTimeForProcToBeKilled);
  if (dwWaitForMultipleObjectsRes != WAIT_OBJECT_0)
     // failed?
  </code></pre>
  <p>I want to verify the condition correctness.</p>