Search code examples
windowsprocessdump

Creating process dump on the fly when it crashes


Is there a way one can force the process to create dumps whenever it crashes. I have an exe running in different OS's and I would like to create a dump whenever it crashes.

By different OS's, I mean different versions of Windows. On XP, you can create using DrWtsn or in > Vista, one can use windows error reporting services. I want to force it programmatically.


Solution

  • MinidumpWriteDump. It doesn't even have to be called from the same process, although there are some restrictions on that.

    You should also make sure you archive your application symbols appropriately if you are getting minidumps from deployed applications. See Symbol Server and Symbol Stores on MSDN.