0

We want to trigger a Windows snapshot minidump from our application and use the MiniDumpWriteDump for this purpose. This is working fine, but it seems that the time of interruption for the process is some time after MiniDumpWriteDump is called. How can we stop all threads from running to have a well-defined moment to call MiniDumpWriteDump.

Would DebugBreakProcess be a suitable way?

Christopher Oezbek
  • 23,994
  • 6
  • 61
  • 85
  • You can't do this from within the process; you'll need an external process, and even then, the viability depends on what you mean by 'well-defined moment.' – Collin Dauphinee Nov 20 '15 at 22:33
  • We have been using this with great success from the same process. It is just that some threads have advanced past the time of exception (it seems). – Christopher Oezbek Nov 20 '15 at 22:40
  • Enumerate process threads, suspend them except the one you're on, do the dump thing afterwards. – Roman R. Nov 20 '15 at 22:45
  • 2
    `MiniDumpWriteDump` already suspends all threads; but the thread actually being suspended isn't synchronous with the call to suspend the thread. – Collin Dauphinee Nov 21 '15 at 00:00

0 Answers0