title: Detecting process crash in .NET
body: <p>Is there a way to determine that a process that my program started has crashed?
  Currently, the solution I found is to look at <code>Process.ExitCode</code> and examine the value:</p>
  
  <pre><code>        this.STProcess = Process.Start(this.CreateProcessStartInfo());
          this.STProcess.WaitForExit();
          if (STProcess.ExitCode != 0)
          {
              //raise error event...
          }
  </code></pre>
  
  <p>I wanted to know if there is a more elegant (and accurate) way of doing this?</p>
  
  <p>I would prefer answers in C# and using P/Invoke is fine as well.</p>
  
  <p>P.S - I need to work on windows XP/Vista/7</p>