title: How is procdump -t -- dump on process termination -- used?
body: <p>The question may be a bit awkward, but here's my detailed problem:</p>
  <p>Currently I'm looking into setting up <a href="http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx" rel="noreferrer">SysInternals' procdump.exe</a> to monitor an application of ours that exhibits spurious disappearances -- that is, the user reports that the application is simply &quot;gone&quot; without any trace after a short visible hang of the application's window.</p>
  <p>My first idea was to run <code>procdump -e -x . MyApp.exe</code> which would record a crash dump when the application encounters an unhandled exception, but then I saw that there is also a <code>-t</code> switch, that --</p>
  <blockquote>
  <p><strong>-t</strong> - Write a dump when the process terminates.</p>
  </blockquote>
  <p>automatically generates a dump when the process terminates.</p>
  <h2>Now the problem</h2>
  <p>I have tested the -t switch with our app by inserting a <code>ExitProcess</code> or <code>TerminateProcess</code> call at a defined location where I can trigger it.</p>
  <p>While the app behaves as expected, i.e. <code>TerminateProcess</code> immediately &quot;kills&quot; the running app and <code>ExitProcess</code> takes a while because global cleanup is run, the dump generated this way is useless in <em>both</em> cases.</p>
  <p>The dumps I get for <code>-t</code> always contain only a sinlge thread (where the app was running over 20 thread at termination time) and the callstack isn't even at a useful location. (It just seems to be one random thread from the terminated app.)</p>
  <p>Am I doing something wrong? Can I usefully use <code>procdump -t</code> to track down unexpected calls of process exit functions at all?</p>