Logo crashrpt
A crash reporting system for Windows applications

CrashRpt.h File Reference

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

Data Structures

 This structure contains information about the crash. More...
 This structure contains information passed to crash callback function PFNCRASHCALLBACK(). More...
 This structure defines the general information used by crInstallW() function. More...
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...


#define CRASHRPT_VER   1403
 Current CrashRpt version.
#define CR_SEH_EXCEPTION   0
 SEH exception.
 C++ terminate() call.
 C++ unexpected() call.
#define CR_CPP_PURE_CALL   3
 C++ pure virtual function call (VS .NET and later).
 C++ new operator fault (VS .NET and later).
 Buffer overrun error (VS .NET only).
 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.
 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).
 Special priority constant that allows to skip certain delivery method.
 Install SEH handler (deprecated name, use CR_INST_SEH_EXCEPTION_HANDLER instead).
 Install SEH handler.
 Install terminate handler.
 Install unexpected handler.
 Install pure call handler (VS .NET and later).
 Install new operator error handler (VS .NET and later).
 Install security error handler (VS .NET and later).
 Install invalid parameter handler (VS 2005 and later).
 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.
 Install SIGSEGV signal handler.
#define CR_INST_SIGTERM_HANDLER   0x1000
 Install SIGTERM signal handler.
 Install all possible exception handlers.
 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).
 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.
 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.
 Makes "Your E-mail" and "Describe what you were doing when the problem occurred" fields of Error Report dialog always visible.
 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.
 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.
 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.
 Function will fail if file doesn't exist at the moment of function call.
 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.
 Take a screenshot of the virtual screen.
#define CR_AS_MAIN_WINDOW   1
 Take a screenshot of application's main window.
 Take a screenshot of all visible process windows.
 Make a grayscale image instead of a full-color one.
 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.
 Capture the whole virtual screen.
#define CR_AV_MAIN_WINDOW   1
 Capture the area of application's main window.
 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.
 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().


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


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.

Michael Carruth

Oleg Krivtsov (zeXspectrum)

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