Post by Reuven NisserHi All,
I am looking for a crash dump program for Windows Vista.
The article "How to use the Userdump.exe tool to create a dump file"
does not apply to Vista.
http://support.microsoft.com/kb/241215
Thanks,
Reuven Nisser
Hi,
you could have a look at the book "Debugging Applications for Microsoft
.NET and Microsoft Windows" from John Robbins. It ships with sample
code, which shows how to create a dump file on the fly from a running
application.
It's a bit tricky, but with that book I've got enough information to add
such a feature to our application.
Now we are able to directly open a live dump file in Visual Studio from
our running application, because I've integrated a http port which
returns a live dump file. Additionally we've added a GUI which allows a
customer to write a dump file from our application on the fly.
Quite cool.
But regarding your problem, when you want to write a dump file on a
crash you have IMHO 2 other options (besides the ones already mentioned
in the other posts):
1) It's "fairly simple" to write a dump file on a crash if you
have an exception info pointer. You can call the function
MiniDumpWriteDump of dbghlp.dll to write one from a structured
exception handler you have registered with
SetUnhandledExceptionFilter.
Unfortunately since VC8.0 this handler isn't called anymore,
at least not for access violations, because the runtime registers
an exception filter with SetUnhandledExceptionFilter, which
directly calls Windows Error Reporting (WER) and aborts the
application, so your structured exception handler won't be
called before.
You can hook the SetUnhandledExceptionFilter function in VC8 / VC9,
and prevent the CRT from handling the exception, before you can.
This will prevent Windows from handling the application and therefore
might impose security risks to your application.
And I don't know if that also works on the 64 Bit edition of Vista.
To make a long story short, it's a "hack" and your decision to use
it. Nevertheless it works ;-).
2) Another option would be to use WER. AFAIK when the user is prompted
to send information to Microsoft, you can view the information,
which shall be sent. One of the files is a minidump, which should be
sufficient for crash dump analysis, is stored in a temp directory.
Your client could sent you this minidump for evaluation, simply
by copying it from the temp directory and sending it to you,
before the information is sent to Microsoft (dialog is shown) and
the file is deleted.
3) O.k. there's another option ;-).
You can register at Microsoft to get access to the database,
which stores the minidumps from your registered applications.
But this is the same one from option 2).
Hopes this helps,
Andre