1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/crashrpt.h
3 // Purpose: helpers for the structured exception handling (SEH) under Win32
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MSW_SEH_H_
13 #define _WX_MSW_SEH_H_
17 #if wxUSE_ON_FATAL_EXCEPTION
19 // ----------------------------------------------------------------------------
20 // report generation flags
21 // ----------------------------------------------------------------------------
25 // we always report where the crash occured
26 wxCRASH_REPORT_LOCATION
= 0,
28 // if this flag is given, the call stack is dumped
29 wxCRASH_REPORT_STACK
= 1,
31 // if this flag is given, the values of the local variables are dumped
32 wxCRASH_REPORT_LOCALS
= 2,
34 // if this flag is given, the values of all global variables are dumped
36 // WARNING: this may take a very long time and generate megabytes of output
37 // in a big program, this is why it is off by default
38 wxCRASH_REPORT_GLOBALS
= 4
41 // ----------------------------------------------------------------------------
42 // wxCrashReport: this class is used to create crash reports
43 // ----------------------------------------------------------------------------
45 struct WXDLLIMPEXP_BASE wxCrashReport
47 // set the name of the file to which the report is written, it is
48 // constructed from the .exe name by default
49 static void SetFileName(const wxChar
*filename
);
51 // return the current file name
52 static const wxChar
*GetFileName();
54 // write the exception report to the file, return true if it could be done
56 static bool Generate(int flags
= wxCRASH_REPORT_LOCATION
|
57 wxCRASH_REPORT_STACK
|
58 wxCRASH_REPORT_LOCALS
);
61 #endif // wxUSE_ON_FATAL_EXCEPTION
63 #endif // _WX_MSW_SEH_H_