How do I get at the exception information when using MiniDumpWriteDump out-of-process?

You also need the MINIDUMP_EXCEPTION_INFORMATION.ThreadId value. The simplest way, and the way I made it work, is to use a memory-mapped file to transfer both the ThreadId and the ExceptionPointers. And a named event to wake up the watchdog. It doesn’t matter that the pointer is not valid in the context of the watchdog process. … Read more

What to do with “The version of SOS does not match the version of CLR you are debugging” in WinDbg?

This is what worked for me: Download the following DLLs: clr.dll mscordacwks.dll SOS.dll from this folder on the machine that generated the dump: C:\Windows\Microsoft.NET\Framework64\v4.0.30319 Run the following command. The path to SOS.DLL should be without quotes, unescaped path delimiters: .load path to downloaded SOS.DLL I think a new WinDbg session is required for this to … Read more

How to create minidump for my process when it crashes?

You need to programatically create a minidump (with one exception, see next link). CodeProject has a nice article on MiniDumps. Basically, you want to use dbghelp.dll, and use the function MiniDumpWriteDump() (see MSDN on MiniDumpWriteDump). How effective such dumps are depends very much on the application. Sometimes, for optimized binaries, they are practically useless. Also, … Read more