34 #ifndef __out_ecount_z 35 #define __out_ecount_z(x) 39 #define CRASHRPT_EXTERNC extern "C" 41 #define CRASHRPT_EXTERNC 44 #define CRASHRPTAPI(rettype) CRASHRPT_EXTERNC rettype WINAPI 47 #define CRASHRPT_VER 1403 93 typedef BOOL (CALLBACK *
LPGETLOGFILE) (__reserved LPVOID lpvState);
96 #define CR_SEH_EXCEPTION 0 97 #define CR_CPP_TERMINATE_CALL 1 98 #define CR_CPP_UNEXPECTED_CALL 2 99 #define CR_CPP_PURE_CALL 3 100 #define CR_CPP_NEW_OPERATOR_ERROR 4 101 #define CR_CPP_SECURITY_ERROR 5 102 #define CR_CPP_INVALID_PARAMETER 6 103 #define CR_CPP_SIGABRT 7 104 #define CR_CPP_SIGFPE 8 105 #define CR_CPP_SIGILL 9 106 #define CR_CPP_SIGINT 10 107 #define CR_CPP_SIGSEGV 11 108 #define CR_CPP_SIGTERM 12 187 const wchar_t*
function;
198 #define CR_CB_STAGE_PREPARE 10 199 #define CR_CB_STAGE_FINISH 20 289 #define CR_CB_CANCEL 0 290 #define CR_CB_DODEFAULT 1 291 #define CR_CB_NOTIFY_NEXT_STAGE 2 440 #define crSetEmailSubject crSetEmailSubjectW 442 #define crSetEmailSubject crSetEmailSubjectA 459 #define crSetCrashCallback crSetCrashCallbackW 461 #define crSetCrashCallback crSetCrashCallbackA 469 #define CR_NEGATIVE_PRIORITY ((UINT)-1) 473 #define CR_INST_STRUCTURED_EXCEPTION_HANDLER 0x1 474 #define CR_INST_SEH_EXCEPTION_HANDLER 0x1 475 #define CR_INST_TERMINATE_HANDLER 0x2 476 #define CR_INST_UNEXPECTED_HANDLER 0x4 477 #define CR_INST_PURE_CALL_HANDLER 0x8 478 #define CR_INST_NEW_OPERATOR_ERROR_HANDLER 0x10 479 #define CR_INST_SECURITY_ERROR_HANDLER 0x20 480 #define CR_INST_INVALID_PARAMETER_HANDLER 0x40 481 #define CR_INST_SIGABRT_HANDLER 0x80 482 #define CR_INST_SIGFPE_HANDLER 0x100 483 #define CR_INST_SIGILL_HANDLER 0x200 484 #define CR_INST_SIGINT_HANDLER 0x400 485 #define CR_INST_SIGSEGV_HANDLER 0x800 486 #define CR_INST_SIGTERM_HANDLER 0x1000 488 #define CR_INST_ALL_POSSIBLE_HANDLERS 0x1FFF 489 #define CR_INST_CRT_EXCEPTION_HANDLERS 0x1FFE 491 #define CR_INST_NO_GUI 0x2000 492 #define CR_INST_HTTP_BINARY_ENCODING 0x4000 493 #define CR_INST_DONT_SEND_REPORT 0x8000 494 #define CR_INST_APP_RESTART 0x10000 495 #define CR_INST_NO_MINIDUMP 0x20000 496 #define CR_INST_SEND_QUEUED_REPORTS 0x40000 497 #define CR_INST_STORE_ZIP_ARCHIVES 0x80000 498 #define CR_INST_SEND_MANDATORY 0x100000 499 #define CR_INST_SHOW_ADDITIONAL_INFO_FIELDS 0x200000 500 #define CR_INST_ALLOW_ATTACH_MORE_FILES 0x400000 501 #define CR_INST_AUTO_THREAD_HANDLERS 0x800000 804 typedef PCR_INSTALL_INFOA PCR_INSTALL_INFO;
870 __in PCR_INSTALL_INFOW pInfo
879 __in PCR_INSTALL_INFOA pInfo
886 #define crInstall crInstallW 888 #define crInstall crInstallA 988 #define CR_AF_TAKE_ORIGINAL_FILE 0 989 #define CR_AF_MAKE_FILE_COPY 1 990 #define CR_AF_FILE_MUST_EXIST 0 991 #define CR_AF_MISSING_FILE_OK 2 992 #define CR_AF_ALLOW_DELETE 4 1080 LPCWSTR pszDestFile,
1101 #define crAddFile2 crAddFile2W 1103 #define crAddFile2 crAddFile2A 1108 #define CR_AS_VIRTUAL_SCREEN 0 1109 #define CR_AS_MAIN_WINDOW 1 1110 #define CR_AS_PROCESS_WINDOWS 2 1111 #define CR_AS_GRAYSCALE_IMAGE 4 1112 #define CR_AS_USE_JPEG_FORMAT 8 1113 #define CR_AS_ALLOW_DELETE 16 1229 #define CR_AV_VIRTUAL_SCREEN 0 1230 #define CR_AV_MAIN_WINDOW 1 1231 #define CR_AV_PROCESS_WINDOWS 2 1232 #define CR_AV_QUALITY_LOW 0 1233 #define CR_AV_QUALITY_GOOD 4 1234 #define CR_AV_QUALITY_BEST 8 1235 #define CR_AV_NO_GUI 16 1236 #define CR_AV_ALLOW_DELETE 32 1357 PSIZE pDesiredFrameSize,
1392 LPCWSTR pszPropName,
1393 LPCWSTR pszPropValue
1410 #define crAddProperty crAddPropertyW 1412 #define crAddProperty crAddPropertyA 1416 #define CR_AR_ALLOW_DELETE 0x1 1459 LPCWSTR pszDstFileName,
1470 LPCSTR pszDstFileName,
1478 #define crAddRegKey crAddRegKeyW 1480 #define crAddRegKey crAddRegKeyA 1573 __in_opt struct _EXCEPTION_POINTERS* ep);
1577 #define CR_NONCONTINUABLE_EXCEPTION 32 1579 #define CR_STACK_OVERFLOW 34 1635 unsigned ExceptionType) throw (...);
1673 __out_ecount_z(uBuffSize) LPWSTR pszBuffer,
1683 __out_ecount_z(uBuffSize) LPSTR pszBuffer,
1691 #define crGetLastErrorMsg crGetLastErrorMsgW 1693 #define crGetLastErrorMsg crGetLastErrorMsgA 1699 #ifndef _CRASHRPT_NO_WRAPPERS 1765 if(m_nInstallStatus==0)
1811 if (m_nInstallStatus == 0)
1821 #endif //_CRASHRPT_H_ LPCSTR pszPrivacyPolicyURL
URL of privacy policy agreement.
Definition: CrashRpt.h:779
crInstallToCurrentThread2(DWORD dwFlags)
Installs exception handlers to the caller thread.
Definition: CrashRpt.cpp:276
This structure contains information passed to crash callback function PFNCRASHCALLBACK().
LPCSTR pszSmtpLogin
Login name used for SMTP authentication when sending error report as E-mail.
Definition: CrashRpt.h:788
CR_EXCEPTION_INFO * pExceptionInfo
Pointer to information about the crash.
Definition: CrashRpt.h:258
LPCWSTR pszPrivacyPolicyURL
URL of privacy policy agreement.
Definition: CrashRpt.h:745
LPVOID pUserParam
Pointer to user-defined data.
Definition: CrashRpt.h:259
Installs (uninstalls) exception handlers for the caller thread in class' constructor (destructor)...
Definition: CrashRpt.h:1798
LPCWSTR pszSmtpLogin
Login name used for SMTP authentication when sending error report as E-mail.
Definition: CrashRpt.h:754
crEmulateCrash(unsigned ExceptionType)
Emulates a predefined crash situation.
Definition: CrashRpt.cpp:866
const wchar_t * file
File in which assertion happened.
Definition: CrashRpt.h:188
int nStage
Stage.
Definition: CrashRpt.h:271
LPCWSTR pszSmtpProxy
Network address and port to be used as SMTP proxy.
Definition: CrashRpt.h:752
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...
crAddScreenshot2(DWORD dwFlags, int nJpegQuality)
Adds a screenshot to the crash report.
Definition: CrashRpt.cpp:480
LPCSTR pszDebugHelpDLL
File name or folder of Debug help DLL.
Definition: CrashRpt.h:780
Definition: CrashRpt.h:767
Definition: CrashRpt.h:733
LPCWSTR pszErrorReportSaveDir
Directory where to save error reports.
Definition: CrashRpt.h:748
LPCSTR pszUrl
URL of server-side script (used in HTTP connection).
Definition: CrashRpt.h:774
BOOL(CALLBACK * LPGETLOGFILE)(__reserved LPVOID lpvState)
Client crash callback function prototype.
Definition: CrashRpt.h:93
DWORD dwFlags
Flags.
Definition: CrashRpt.h:778
WORD cb
Size of this structure in bytes; must be initialized before using!
Definition: CrashRpt.h:769
crSetCrashCallbackW(PFNCRASHCALLBACKW pfnCallbackFunc, LPVOID lpParam)
Sets the crash callback function.
Definition: CrashRpt.cpp:332
WORD cb
Size of this structure in bytes.
Definition: CrashRpt.h:255
CR_CRASH_CALLBACK_INFOA CR_CRASH_CALLBACK_INFO
Character set-independent mapping of CR_CRASH_CALLBACK_INFOW and CR_CRASH_CALLBACK_INFOA structures...
Definition: CrashRpt.h:285
crGenerateErrorReport(__in_opt CR_EXCEPTION_INFO *pExceptionInfo)
Manually generates an error report.
crSetCrashCallbackA(PFNCRASHCALLBACKA pfnCallbackFunc, LPVOID lpParam)
Sets the crash callback function.
Definition: CrashRpt.cpp:357
crAddScreenshot(DWORD dwFlags)
Adds a screenshot to the crash report.
Definition: CrashRpt.cpp:472
LPCSTR pszErrorReportFolder
Directory where crash report files are located.
Definition: CrashRpt.h:272
LPGETLOGFILE pfnCrashCallback
Deprecated, do not use.
Definition: CrashRpt.h:742
crUninstall()
Uninitializes the CrashRpt library and unsinstalls exception handlers previously installed with crIns...
MINIDUMP_TYPE uMiniDumpType
Minidump type.
Definition: CrashRpt.h:747
int nRestartTimeout
Timeout for application restart.
Definition: CrashRpt.h:756
crInstallW(__in PCR_INSTALL_INFOW pInfo)
Installs exception handlers for the caller process.
crGetLastErrorMsgA(__out_ecount_z(uBuffSize) LPSTR pszBuffer, UINT uBuffSize)
Gets the last CrashRpt error message.
crAddRegKeyA(LPCSTR pszRegKey, LPCSTR pszDstFileName, DWORD dwFlags)
Adds a registry key dump to the crash report.
Definition: CrashRpt.cpp:599
struct tagCR_EXCEPTION_INFO CR_EXCEPTION_INFO
This structure contains information about the crash.
unsigned int fpe_subcode
Floating point exception subcode.
Definition: CrashRpt.h:185
LPCWSTR pszSmtpPassword
Password used for SMTP authentication when sending error report as E-mail.
Definition: CrashRpt.h:755
~CrThreadAutoInstallHelper()
Uninstalls exception handlers from the caller thread.
Definition: CrashRpt.h:1809
LPCWSTR pszErrorReportFolder
Directory where crash report files are located.
Definition: CrashRpt.h:257
CrAutoInstallHelper(__in PCR_INSTALL_INFOA pInfo)
Installs exception handlers to the caller process.
Definition: CrashRpt.h:1751
int nRestartTimeout
Timeout for application restart.
Definition: CrashRpt.h:790
WORD cb
Size of this structure in bytes.
Definition: CrashRpt.h:270
MINIDUMP_TYPE uMiniDumpType
Mini dump type.
Definition: CrashRpt.h:781
LPCSTR pszErrorReportSaveDir
Directory where to save error reports.
Definition: CrashRpt.h:782
int(CALLBACK * PFNCRASHCALLBACKW)(CR_CRASH_CALLBACK_INFOW *pInfo)
Client crash callback function prototype.
Definition: CrashRpt.h:382
BOOL bContinueExecution
Whether to terminate the process (the default) or to continue program execution.
Definition: CrashRpt.h:260
LPCWSTR pszEmailSubject
Subject of crash report e-mail.
Definition: CrashRpt.h:739
LPCWSTR pszCustomSenderIcon
Custom icon used for Error Report dialog.
Definition: CrashRpt.h:753
crAddPropertyA(LPCSTR pszPropName, LPCSTR pszPropValue)
Adds a string property to the crash report.
Definition: CrashRpt.cpp:555
LPCSTR pszRestartCmdLine
Command line for application restart (without executable name).
Definition: CrashRpt.h:783
crAddFile2A(LPCSTR pszFile, LPCSTR pszDestFile, LPCSTR pszDesc, DWORD dwFlags)
Adds a file to crash report.
int m_nInstallStatus
Install status.
Definition: CrashRpt.h:1770
This structure contains information about the crash.
Definition: CrashRpt.h:179
~CrAutoInstallHelper()
Uninstalls exception handlers from the caller process.
Definition: CrashRpt.h:1763
LPCSTR pszAppName
Name of application.
Definition: CrashRpt.h:770
LPCSTR pszCrashSenderPath
Directory name where CrashSender.exe is located.
Definition: CrashRpt.h:775
LPCWSTR pszEmailText
Custom E-mail text (used when deliverying report as E-mail).
Definition: CrashRpt.h:751
LPCSTR pszCustomSenderIcon
Custom icon used for Error Report dialog.
Definition: CrashRpt.h:787
LPGETLOGFILE pfnCrashCallback
Deprecated, do not use.
Definition: CrashRpt.h:776
LPCWSTR pszRestartCmdLine
Command line for application restart (without executable name).
Definition: CrashRpt.h:749
This structure defines the general information used by crInstallW() function.
WORD cb
Size of this structure in bytes; must be initialized before using!
Definition: CrashRpt.h:735
LPCSTR pszAppVersion
Application version.
Definition: CrashRpt.h:771
LPCSTR pszLangFilePath
Path to the language file (including file name).
Definition: CrashRpt.h:784
This structure defines the general information used by crInstallW() function.
Definition: inftrees.h:24
LPCSTR pszSmtpPassword
Password used for SMTP authentication when sending error report as E-mail.
Definition: CrashRpt.h:789
DWORD dwFlags
Flags.
Definition: CrashRpt.h:744
CrThreadAutoInstallHelper(DWORD dwFlags=0)
Installs exception handlers to the caller thread.
Definition: CrashRpt.h:1803
Installs exception handlers in constructor and uninstalls in destructor.
Definition: CrashRpt.h:1746
unsigned int line
Line number.
Definition: CrashRpt.h:189
HANDLE hSenderProcess
Handle to the CrashSender.exe process.
Definition: CrashRpt.h:191
int nStage
Stage.
Definition: CrashRpt.h:256
LPCSTR pszSmtpProxy
Network address and port to be used as SMTP proxy.
Definition: CrashRpt.h:786
LPCWSTR pszUrl
URL of server-side script (used in HTTP connection).
Definition: CrashRpt.h:740
CR_INSTALL_INFOA CR_INSTALL_INFO
Character set-independent mapping of CR_INSTALL_INFOW and CR_INSTALL_INFOA structures.
Definition: CrashRpt.h:803
crInstallA(__in PCR_INSTALL_INFOA pInfo)
Installs exception handlers for the caller process.
int(CALLBACK * PFNCRASHCALLBACKA)(CR_CRASH_CALLBACK_INFOA *pInfo)
Client crash callback function prototype.
Definition: CrashRpt.h:387
LPCWSTR pszLangFilePath
Path to the language file (including file name).
Definition: CrashRpt.h:750
LPCWSTR pszAppName
Name of application.
Definition: CrashRpt.h:736
BOOL bContinueExecution
Whether to terminate the process (the default) or to continue program execution.
Definition: CrashRpt.h:275
PFNCRASHCALLBACKA PFNCRASHCALLBACK
Character set-independent mapping of PFNCRASHCALLBACKW() and PFNCRASHCALLBACKA() function prototrypes...
Definition: CrashRpt.h:395
LPCSTR pszEmailText
Custom E-mail text (used when deliverying report as E-mail).
Definition: CrashRpt.h:785
CrAutoInstallHelper(__in PCR_INSTALL_INFOW pInfo)
Installs exception handlers to the caller process.
Definition: CrashRpt.h:1757
Definition: CrashRpt.h:268
crAddRegKeyW(LPCWSTR pszRegKey, LPCWSTR pszDstFileName, DWORD dwFlags)
Adds a registry key dump to the crash report.
Definition: CrashRpt.cpp:566
LPVOID pUserParam
Pointer to user-defined data.
Definition: CrashRpt.h:274
crUninstallFromCurrentThread()
Uninstalls C++ exception handlers from the current thread.
Definition: CrashRpt.cpp:299
Definition: CrashRpt.h:253
const wchar_t * expression
Assertion expression.
Definition: CrashRpt.h:186
This structure contains information passed to crash callback function PFNCRASHCALLBACK().
crGetLastErrorMsgW(__out_ecount_z(uBuffSize) LPWSTR pszBuffer, UINT uBuffSize)
Gets the last CrashRpt error message.
int m_nInstallStatus
Install status.
Definition: CrashRpt.h:1816
CR_EXCEPTION_INFO * pExceptionInfo
Pointer to information about the crash.
Definition: CrashRpt.h:273
crAddPropertyW(LPCWSTR pszPropName, LPCWSTR pszPropValue)
Adds a string property to the crash report.
Definition: CrashRpt.cpp:523
crExceptionFilter(unsigned int code, __in_opt struct _EXCEPTION_POINTERS *ep)
Can be used as a SEH exception filter.
WORD cb
Size of this structure in bytes; should be initialized before using.
Definition: CrashRpt.h:181
DWORD code
Code of SEH exception.
Definition: CrashRpt.h:184
int exctype
Exception type.
Definition: CrashRpt.h:183
BOOL bManual
Flag telling if the error report is generated manually or not.
Definition: CrashRpt.h:190
crAddFile2W(LPCWSTR pszFile, LPCWSTR pszDestFile, LPCWSTR pszDesc, DWORD dwFlags)
Adds a file to crash report.
PEXCEPTION_POINTERS pexcptrs
Exception pointers.
Definition: CrashRpt.h:182
LPCWSTR pszEmailTo
E-mail address of crash reports recipient.
Definition: CrashRpt.h:738
LPCWSTR pszAppVersion
Application version.
Definition: CrashRpt.h:737
LPCWSTR pszDebugHelpDLL
File name or folder of Debug help DLL.
Definition: CrashRpt.h:746
LPCSTR pszEmailTo
E-mail address of crash reports recipient.
Definition: CrashRpt.h:772
LPCWSTR pszCrashSenderPath
Directory name where CrashSender.exe is located.
Definition: CrashRpt.h:741
LPCSTR pszEmailSubject
Subject of crash report e-mail.
Definition: CrashRpt.h:773