At the moment my info is (and let's keep the context to Windows-7, as WER doesn't work like that on Win-XP) that I have two ways of getting a full memory crash dump for my application:
I can set up WER to generate a local full memory dump of my application
The info is here: http://msdn.microsoft.com/en-us/library/bb787181%28v=vs.85%29.aspx
- Add (also for 32bit apps. Do not use SysWow64 node)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps
key (possibly app specific subkey...LocalDumps\MyApplication.exe
) - Set
DumpType
to 2. - Tweak other settings as neccessary
Note: As our application is custom deployed, setting this registry value isn't a problem.
This seems to give me pretty reliable crash dumps with a simple demo app.
Or, I can rig up the dump writing myself - properly with watchdog process and all
I use MiniDumpWriteDump
to write the dump and I do this from a watchdog process (as described here, here) to minimize risk of failure.
Question
So, which is the better approach? Given that, when doing it myself, I prudently keep the stuff I do in the crash handler to an absolute minimum, I'm wondering whether the WER approach is as reliable, or whether the WER approach does some more things in-process that may fail. Any ideas/experiences?