title: How to tell if a process started with CreateProcess is still running?
body: <p>If I've got a process created through <code>CreateProcess()</code>, how would I determine if it's still running? I know I need to use <code>pi.hProcess</code> but I don't know how, and google isn't really giving me meaningful hints.</p>
  
  <pre><code>PROCESS_INFORMATION pi;
  STARTUPINFO si;
  ZeroMemory(&amp;si, sizeof(si));
  si.cb = sizeof(si);
  ZeroMemory(&amp;pi, sizeof(pi));
  bool got_it=CreateProcess(NULL, CA2T(launchString.c_str()), NULL, NULL, false, NORMAL_PRIORITY_CLASS, NULL, NULL, &amp;si, &amp;pi);
  </code></pre>