Logo crashrpt
A crash reporting system for Windows applications

CrashRpt.h File Reference

Defines the interface for the CrashRpt.DLL. More...


Data Structures

struct  CR_EXCEPTION_INFO
 This structure contains information about the crash. More...
struct  CR_CRASH_CALLBACK_INFOW
 This structure contains information passed to crash callback function PFNCRASHCALLBACK(). More...
struct  CR_CRASH_CALLBACK_INFOA
struct  CR_INSTALL_INFOW
 This structure defines the general information used by crInstallW() function. More...
struct  CR_INSTALL_INFOA
class  CrAutoInstallHelper
 Installs exception handlers in constructor and uninstalls in destructor. More...
class  CrThreadAutoInstallHelper
 Installs (uninstalls) exception handlers for the caller thread in class' constructor (destructor). More...

Defines

#define CRASHRPT_VER   1403
 Current CrashRpt version.
#define CR_SEH_EXCEPTION   0
 SEH exception.
#define CR_CPP_TERMINATE_CALL   1
 C++ terminate() call.
#define CR_CPP_UNEXPECTED_CALL   2
 C++ unexpected() call.
#define CR_CPP_PURE_CALL   3
 C++ pure virtual function call (VS .NET and later).
#define CR_CPP_NEW_OPERATOR_ERROR   4
 C++ new operator fault (VS .NET and later).
#define CR_CPP_SECURITY_ERROR   5
 Buffer overrun error (VS .NET only).
#define CR_CPP_INVALID_PARAMETER   6
 Invalid parameter exception (VS 2005 and later).
#define CR_CPP_SIGABRT   7
 C++ SIGABRT signal (abort).
#define CR_CPP_SIGFPE   8
 C++ SIGFPE signal (flotating point exception).
#define CR_CPP_SIGILL   9
 C++ SIGILL signal (illegal instruction).
#define CR_CPP_SIGINT   10
 C++ SIGINT signal (CTRL+C).
#define CR_CPP_SIGSEGV   11
 C++ SIGSEGV signal (invalid storage access).
#define CR_CPP_SIGTERM   12
 C++ SIGTERM signal (termination request).
#define CR_CB_STAGE_PREPARE   10
 Stage after exception pointers've been retrieved.
#define CR_CB_STAGE_FINISH   20
 Stage after the launch of CrashSender.exe process.
#define CR_CB_CANCEL   0
 Cancel crash report generation on the current stage.
#define CR_CB_DODEFAULT   1
 Proceed to the next stages of crash report generation without calling crash callback function.
#define CR_CB_NOTIFY_NEXT_STAGE   2
 Proceed and call the crash callback for the next stage.
#define crSetCrashCallback   crSetCrashCallbackA
 Character set-independent mapping of crSetCrashCallbackW() and crSetCrashCallbackA() functions.
#define CR_HTTP   0
 Send error report via HTTP (or HTTPS) connection.
#define CR_SMTP   1
 Send error report via SMTP connection.
#define CR_SMAPI   2
 Send error report via simple MAPI (using default mail client).
#define CR_NEGATIVE_PRIORITY   ((UINT)-1)
 Special priority constant that allows to skip certain delivery method.
#define CR_INST_STRUCTURED_EXCEPTION_HANDLER   0x1
 Install SEH handler (deprecated name, use CR_INST_SEH_EXCEPTION_HANDLER instead).
#define CR_INST_SEH_EXCEPTION_HANDLER   0x1
 Install SEH handler.
#define CR_INST_TERMINATE_HANDLER   0x2
 Install terminate handler.
#define CR_INST_UNEXPECTED_HANDLER   0x4
 Install unexpected handler.
#define CR_INST_PURE_CALL_HANDLER   0x8
 Install pure call handler (VS .NET and later).
#define CR_INST_NEW_OPERATOR_ERROR_HANDLER   0x10
 Install new operator error handler (VS .NET and later).
#define CR_INST_SECURITY_ERROR_HANDLER   0x20
 Install security error handler (VS .NET and later).
#define CR_INST_INVALID_PARAMETER_HANDLER   0x40
 Install invalid parameter handler (VS 2005 and later).
#define CR_INST_SIGABRT_HANDLER   0x80
 Install SIGABRT signal handler.
#define CR_INST_SIGFPE_HANDLER   0x100
 Install SIGFPE signal handler.
#define CR_INST_SIGILL_HANDLER   0x200
 Install SIGILL signal handler.
#define CR_INST_SIGINT_HANDLER   0x400
 Install SIGINT signal handler.
#define CR_INST_SIGSEGV_HANDLER   0x800
 Install SIGSEGV signal handler.
#define CR_INST_SIGTERM_HANDLER   0x1000
 Install SIGTERM signal handler.
#define CR_INST_ALL_POSSIBLE_HANDLERS   0x1FFF
 Install all possible exception handlers.
#define CR_INST_CRT_EXCEPTION_HANDLERS   0x1FFE
 Install exception handlers for the linked CRT module.
#define CR_INST_NO_GUI   0x2000
 Do not show GUI, send report silently (use for non-GUI apps only).
#define CR_INST_HTTP_BINARY_ENCODING   0x4000
 Deprecated, do not use.
#define CR_INST_DONT_SEND_REPORT   0x8000
 Don't send error report immediately, just save it locally.
#define CR_INST_APP_RESTART   0x10000
 Restart the application on crash.
#define CR_INST_NO_MINIDUMP   0x20000
 Do not include minidump file to crash report.
#define CR_INST_SEND_QUEUED_REPORTS   0x40000
 CrashRpt should send error reports that are waiting to be delivered.
#define CR_INST_STORE_ZIP_ARCHIVES   0x80000
 CrashRpt should store both uncompressed error report files and ZIP archives.
#define CR_INST_SEND_MANDATORY   0x100000
 This flag removes the "Close" and "Other actions" buttons from Error Report dialog, thus making the sending procedure mandatory for user.
#define CR_INST_SHOW_ADDITIONAL_INFO_FIELDS   0x200000
 Makes "Your E-mail" and "Describe what you were doing when the problem occurred" fields of Error Report dialog always visible.
#define CR_INST_ALLOW_ATTACH_MORE_FILES   0x400000
 Adds an ability for user to attach more files to crash report by clicking "Attach More File(s)" item from context menu of Error Report Details dialog.
#define CR_INST_AUTO_THREAD_HANDLERS   0x800000
 If this flag is set, installs exception handlers for newly created threads automatically.
#define crInstall   crInstallA
 Character set-independent mapping of crInstallW() and crInstallA() functions.
#define CR_AF_TAKE_ORIGINAL_FILE   0
 Take the original file (do not copy it to the error report folder).
#define CR_AF_MAKE_FILE_COPY   1
 Copy the file to the error report folder.
#define CR_AF_FILE_MUST_EXIST   0
 Function will fail if file doesn't exist at the moment of function call.
#define CR_AF_MISSING_FILE_OK   2
 Do not fail if file is missing (assume it will be created later).
#define CR_AF_ALLOW_DELETE   4
 If this flag is specified, the file will be deletable from context menu of Error Report Details dialog.
#define crAddFile2   crAddFile2A
 Character set-independent mapping of crAddFile2W() and crAddFile2A() functions.
#define CR_AS_VIRTUAL_SCREEN   0
 Take a screenshot of the virtual screen.
#define CR_AS_MAIN_WINDOW   1
 Take a screenshot of application's main window.
#define CR_AS_PROCESS_WINDOWS   2
 Take a screenshot of all visible process windows.
#define CR_AS_GRAYSCALE_IMAGE   4
 Make a grayscale image instead of a full-color one.
#define CR_AS_USE_JPEG_FORMAT   8
 Store screenshots as JPG files.
#define CR_AS_ALLOW_DELETE   16
 If this flag is specified, the file will be deletable from context menu of Error Report Details dialog.
#define CR_AV_VIRTUAL_SCREEN   0
 Capture the whole virtual screen.
#define CR_AV_MAIN_WINDOW   1
 Capture the area of application's main window.
#define CR_AV_PROCESS_WINDOWS   2
 Capture all visible process windows.
#define CR_AV_QUALITY_LOW   0
 Low quality video encoding, smaller file size.
#define CR_AV_QUALITY_GOOD   4
 Good encoding quality, larger file size.
#define CR_AV_QUALITY_BEST   8
 The best encoding quality, the largest file size.
#define CR_AV_NO_GUI   16
 Do not display the notification dialog.
#define CR_AV_ALLOW_DELETE   32
 If this flag is specified, the file will be deletable from context menu of Error Report Details dialog.
#define crAddProperty   crAddPropertyA
 Character set-independent mapping of crAddPropertyW() and crAddPropertyA() functions.
#define CR_AR_ALLOW_DELETE   0x1
 If this flag is specified, the file will be deletable from context menu of Error Report Details dialog.
#define crAddRegKey   crAddRegKeyA
 Character set-independent mapping of crAddRegKeyW() and crAddRegKeyA() functions.
#define CR_NONCONTINUABLE_EXCEPTION   32
 Non continuable sofware exception.
#define CR_THROW   33
 Throw C++ typed exception.
#define CR_STACK_OVERFLOW   34
 Stack overflow.
#define crGetLastErrorMsg   crGetLastErrorMsgA
 Defines character set-independent mapping for crGetLastErrorMsgW() and crGetLastErrorMsgA().

Typedefs

typedef BOOL(* LPGETLOGFILE )(LPVOID lpvState)
 Client crash callback function prototype.
typedef CR_CRASH_CALLBACK_INFOA CR_CRASH_CALLBACK_INFO
 Character set-independent mapping of CR_CRASH_CALLBACK_INFOW and CR_CRASH_CALLBACK_INFOA structures.
typedef int(* PFNCRASHCALLBACKW )(CR_CRASH_CALLBACK_INFOW *pInfo)
 Client crash callback function prototype.
typedef int(* PFNCRASHCALLBACKA )(CR_CRASH_CALLBACK_INFOA *pInfo)
typedef PFNCRASHCALLBACKA PFNCRASHCALLBACK
 Character set-independent mapping of PFNCRASHCALLBACKW() and PFNCRASHCALLBACKA() function prototrypes.
typedef CR_INSTALL_INFOA CR_INSTALL_INFO
 Character set-independent mapping of CR_INSTALL_INFOW and CR_INSTALL_INFOA structures.

Functions

int crSetCrashCallbackW (PFNCRASHCALLBACKW pfnCallbackFunc, LPVOID lpParam)
 Sets the crash callback function.
int crSetCrashCallbackA (PFNCRASHCALLBACKA pfnCallbackFunc, LPVOID lpParam)
int crInstallW (PCR_INSTALL_INFOW pInfo)
 Installs exception handlers for the caller process.
int crInstallA (PCR_INSTALL_INFOA pInfo)
int crUninstall ()
 Uninitializes the CrashRpt library and unsinstalls exception handlers previously installed with crInstall().
int crInstallToCurrentThread2 (DWORD dwFlags)
 Installs exception handlers to the caller thread.
int crUninstallFromCurrentThread ()
 Uninstalls C++ exception handlers from the current thread.
int crAddFile2W (LPCWSTR pszFile, LPCWSTR pszDestFile, LPCWSTR pszDesc, DWORD dwFlags)
 Adds a file to crash report.
int crAddFile2A (LPCSTR pszFile, LPCSTR pszDestFile, LPCSTR pszDesc, DWORD dwFlags)
int crAddScreenshot (DWORD dwFlags)
 Adds a screenshot to the crash report.
int crAddScreenshot2 (DWORD dwFlags, int nJpegQuality)
 Adds a screenshot to the crash report.
int crAddVideo (DWORD dwFlags, int nDuration, int nFrameInterval, PSIZE pDesiredFrameSize, HWND hWndParent)
 Allows to record what happened before crash to a video file and include the file to crash report.
int crAddPropertyW (LPCWSTR pszPropName, LPCWSTR pszPropValue)
 Adds a string property to the crash report.
int crAddPropertyA (LPCSTR pszPropName, LPCSTR pszPropValue)
int crAddRegKeyW (LPCWSTR pszRegKey, LPCWSTR pszDstFileName, DWORD dwFlags)
 Adds a registry key dump to the crash report.
int crAddRegKeyA (LPCSTR pszRegKey, LPCSTR pszDstFileName, DWORD dwFlags)
int crGenerateErrorReport (CR_EXCEPTION_INFO *pExceptionInfo)
 Manually generates an error report.
int crExceptionFilter (unsigned int code, struct _EXCEPTION_POINTERS *ep)
 Can be used as a SEH exception filter.
int crEmulateCrash (unsigned ExceptionType) throw (...)
 Emulates a predefined crash situation.
int crGetLastErrorMsgW (LPWSTR pszBuffer, UINT uBuffSize)
 Gets the last CrashRpt error message.
int crGetLastErrorMsgA (LPSTR pszBuffer, UINT uBuffSize)


Detailed Description

Defines the interface for the CrashRpt.DLL.

Date:
2003
Author:
Michael Carruth

Oleg Krivtsov (zeXspectrum)


Generated on Wed Apr 29 10:17:30 2015 for CrashRpt by doxygen 1.5.9