Share via


Generating A Dump From A Handled Exception (Windows Embedded CE 6.0)

1/5/2010

You can use Error Reporting functionality to gather information about a particular situation you want to analyze in an application by creating a special form of handled exception.

The error reporting system generates crash dump files automatically when a second-chance exception occurs. Hence, to generate a dump file when a specific event occurs, you can insert an exception handler that generates an exception based on the criteria you choose. If a second-chance exception occurs in the inserted handler, the error reporting system will generate a dump file.

The following snippet provides an example of how to generate a dump file from a handled exception:

__try
    {
        FunctionThatGeneratesAnException();
    }
__except(ReportFault(GetExceptionInformation(),0), EXCEPTION_EXECUTE_HANDLER)
    {
        SomeHandlerFunction();
    }

You can use default settings to have this file uploaded to the Watson site at Microsoft, or you can override the default settings and save it on the debugging target machine.

For information about saving a dump file locally, see Capturing a Dump File on a Standalone Device.

For more information, see Report Upload Client Registry Settings.

See Also

Tasks

Capturing a Dump File on a Standalone Device

Other Resources

Post-Mortem Debugging