Share via


Generating A Dump From A Handled Exception (Windows CE 5.0)

Send Feedback

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 more information, see Report Upload Client Registry Settings.

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

See Also

Capturing a Dump File on a Standalone Device | Exception-Handler Syntax

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.