crashrpt
CrashRpt.h
Go to the documentation of this file.
1 /*************************************************************************************
2 This file is a part of CrashRpt library.
3 Copyright (c) 2003-2013 The CrashRpt project authors. All Rights Reserved.
4 
5 Use of this source code is governed by a BSD-style license
6 that can be found in the License.txt file in the root of the source
7 tree. All contributing project authors may
8 be found in the Authors.txt file in the root of the source tree.
9 ***************************************************************************************/
10 
18 #ifndef _CRASHRPT_H_
19 #define _CRASHRPT_H_
20 
21 #include <windows.h>
22 #include <dbghelp.h>
23 
24 // Define SAL macros to be empty if some old Visual Studio used
25 #ifndef __reserved
26 #define __reserved
27 #endif
28 #ifndef __in
29 #define __in
30 #endif
31 #ifndef __in_opt
32 #define __in_opt
33 #endif
34 #ifndef __out_ecount_z
35 #define __out_ecount_z(x)
36 #endif
37 
38 #ifdef __cplusplus
39 #define CRASHRPT_EXTERNC extern "C"
40 #else
41 #define CRASHRPT_EXTERNC
42 #endif
43 
44 #define CRASHRPTAPI(rettype) CRASHRPT_EXTERNC rettype WINAPI
45 
47 #define CRASHRPT_VER 1403
48 
93 typedef BOOL (CALLBACK *LPGETLOGFILE) (__reserved LPVOID lpvState);
94 
95 // Exception types used in CR_EXCEPTION_INFO::exctype structure member.
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
109 
110 
179 typedef struct tagCR_EXCEPTION_INFO
180 {
181  WORD cb;
182  PEXCEPTION_POINTERS pexcptrs;
183  int exctype;
184  DWORD code;
185  unsigned int fpe_subcode;
186  const wchar_t* expression;
187  const wchar_t* function;
188  const wchar_t* file;
189  unsigned int line;
190  BOOL bManual;
191  HANDLE hSenderProcess;
192 }
194 
196 
197 // Stages of crash report generation (used by the crash callback function).
198 #define CR_CB_STAGE_PREPARE 10
199 #define CR_CB_STAGE_FINISH 20
200 
201 
254 {
255  WORD cb;
256  int nStage;
259  LPVOID pUserParam;
261 }
263 
269 {
270  WORD cb;
271  int nStage;
274  LPVOID pUserParam;
276 }
278 
282 #ifdef UNICODE
284 #else
286 #endif // UNICODE
287 
288 // Constants that may be returned by the crash callback function.
289 #define CR_CB_CANCEL 0
290 #define CR_CB_DODEFAULT 1
291 #define CR_CB_NOTIFY_NEXT_STAGE 2
292 
293 
382 typedef int (CALLBACK *PFNCRASHCALLBACKW) (CR_CRASH_CALLBACK_INFOW* pInfo);
383 
387 typedef int (CALLBACK *PFNCRASHCALLBACKA) (CR_CRASH_CALLBACK_INFOA* pInfo);
388 
392 #ifdef UNICODE
394 #else
396 #endif // UNICODE
397 
420 CRASHRPTAPI(int)
422  PFNCRASHCALLBACKW pfnCallbackFunc,
423  LPVOID lpParam
424  );
425 
426 CRASHRPTAPI(int)
427 crSetEmailSubjectW(
428  LPCWSTR pszSubject
429 );
430 
431 CRASHRPTAPI(int)
432 crSetEmailSubjectA(
433  LPCSTR pszSubject
434 );
435 
439 #ifdef UNICODE
440 #define crSetEmailSubject crSetEmailSubjectW
441 #else
442 #define crSetEmailSubject crSetEmailSubjectA
443 #endif //UNICODE
444 
448 CRASHRPTAPI(int)
450  PFNCRASHCALLBACKA pfnCallbackFunc,
451  LPVOID lpParam
452  );
453 
454 
458 #ifdef UNICODE
459 #define crSetCrashCallback crSetCrashCallbackW
460 #else
461 #define crSetCrashCallback crSetCrashCallbackA
462 #endif //UNICODE
463 
464 // Array indices for CR_INSTALL_INFO::uPriorities.
465 #define CR_HTTP 0
466 #define CR_SMTP 1
467 #define CR_SMAPI 2
468 
469 #define CR_NEGATIVE_PRIORITY ((UINT)-1)
471 
472 // Flags for CR_INSTALL_INFO::dwFlags
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
487 
488 #define CR_INST_ALL_POSSIBLE_HANDLERS 0x1FFF
489 #define CR_INST_CRT_EXCEPTION_HANDLERS 0x1FFE
490 
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
502 
503 
733 typedef struct tagCR_INSTALL_INFOW
734 {
735  WORD cb;
736  LPCWSTR pszAppName;
737  LPCWSTR pszAppVersion;
738  LPCWSTR pszEmailTo;
739  LPCWSTR pszEmailSubject;
740  LPCWSTR pszUrl;
743  UINT uPriorities[5];
744  DWORD dwFlags;
746  LPCWSTR pszDebugHelpDLL;
747  MINIDUMP_TYPE uMiniDumpType;
750  LPCWSTR pszLangFilePath;
751  LPCWSTR pszEmailText;
752  LPCWSTR pszSmtpProxy;
754  LPCWSTR pszSmtpLogin;
755  LPCWSTR pszSmtpPassword;
757 }
759 
761 
767 typedef struct tagCR_INSTALL_INFOA
768 {
769  WORD cb;
770  LPCSTR pszAppName;
771  LPCSTR pszAppVersion;
772  LPCSTR pszEmailTo;
774  LPCSTR pszUrl;
777  UINT uPriorities[5];
778  DWORD dwFlags;
781  MINIDUMP_TYPE uMiniDumpType;
785  LPCSTR pszEmailText;
786  LPCSTR pszSmtpProxy;
788  LPCSTR pszSmtpLogin;
791 }
793 
795 
799 #ifdef UNICODE
801 typedef PCR_INSTALL_INFOW PCR_INSTALL_INFO;
802 #else
804 typedef PCR_INSTALL_INFOA PCR_INSTALL_INFO;
805 #endif // UNICODE
806 
868 CRASHRPTAPI(int)
869 crInstallW(
870  __in PCR_INSTALL_INFOW pInfo
871  );
872 
877 CRASHRPTAPI(int)
878 crInstallA(
879  __in PCR_INSTALL_INFOA pInfo
880  );
881 
885 #ifdef UNICODE
886 #define crInstall crInstallW
887 #else
888 #define crInstall crInstallA
889 #endif //UNICODE
890 
912 CRASHRPTAPI(int)
913 crUninstall();
914 
958 CRASHRPTAPI(int)
959 crInstallToCurrentThread2(DWORD dwFlags);
960 
983 CRASHRPTAPI(int)
985 
986 // Flags for crAddFile2() function.
987 
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
993 
994 
1077 CRASHRPTAPI(int)
1078 crAddFile2W(
1079  LPCWSTR pszFile,
1080  LPCWSTR pszDestFile,
1081  LPCWSTR pszDesc,
1082  DWORD dwFlags
1083  );
1084 
1089 CRASHRPTAPI(int)
1090 crAddFile2A(
1091  LPCSTR pszFile,
1092  LPCSTR pszDestFile,
1093  LPCSTR pszDesc,
1094  DWORD dwFlags
1095  );
1096 
1100 #ifdef UNICODE
1101 #define crAddFile2 crAddFile2W
1102 #else
1103 #define crAddFile2 crAddFile2A
1104 #endif //UNICODE
1105 
1106 
1107 // Flags for crAddScreenshot function.
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
1114 
1115 
1168 CRASHRPTAPI(int)
1170  DWORD dwFlags
1171  );
1172 
1222 CRASHRPTAPI(int)
1224  DWORD dwFlags,
1225  int nJpegQuality
1226  );
1227 
1228 // Flags for crAddVideo function.
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
1237 
1238 
1352 CRASHRPTAPI(int)
1353 crAddVideo(
1354  DWORD dwFlags,
1355  int nDuration,
1356  int nFrameInterval,
1357  PSIZE pDesiredFrameSize,
1358  HWND hWndParent
1359  );
1360 
1390 CRASHRPTAPI(int)
1392  LPCWSTR pszPropName,
1393  LPCWSTR pszPropValue
1394  );
1395 
1400 CRASHRPTAPI(int)
1402  LPCSTR pszPropName,
1403  LPCSTR pszPropValue
1404  );
1405 
1409 #ifdef UNICODE
1410 #define crAddProperty crAddPropertyW
1411 #else
1412 #define crAddProperty crAddPropertyA
1413 #endif //UNICODE
1414 
1415 // Flags that can be passed to crAddRegKey() function
1416 #define CR_AR_ALLOW_DELETE 0x1
1417 
1418 
1456 CRASHRPTAPI(int)
1457 crAddRegKeyW(
1458  LPCWSTR pszRegKey,
1459  LPCWSTR pszDstFileName,
1460  DWORD dwFlags
1461  );
1462 
1467 CRASHRPTAPI(int)
1468 crAddRegKeyA(
1469  LPCSTR pszRegKey,
1470  LPCSTR pszDstFileName,
1471  DWORD dwFlags
1472  );
1473 
1477 #ifdef UNICODE
1478 #define crAddRegKey crAddRegKeyW
1479 #else
1480 #define crAddRegKey crAddRegKeyA
1481 #endif //UNICODE
1482 
1527 CRASHRPTAPI(int)
1529  __in_opt CR_EXCEPTION_INFO* pExceptionInfo
1530  );
1531 
1570 CRASHRPTAPI(int)
1572  unsigned int code,
1573  __in_opt struct _EXCEPTION_POINTERS* ep);
1574 
1575 
1576 // Flags used by crEmulateCrash() function
1577 #define CR_NONCONTINUABLE_EXCEPTION 32
1578 #define CR_THROW 33
1579 #define CR_STACK_OVERFLOW 34
1580 
1581 
1633 CRASHRPTAPI(int)
1635  unsigned ExceptionType) throw (...);
1636 
1637 
1638 
1671 CRASHRPTAPI(int)
1673  __out_ecount_z(uBuffSize) LPWSTR pszBuffer,
1674  UINT uBuffSize);
1675 
1681 CRASHRPTAPI(int)
1683  __out_ecount_z(uBuffSize) LPSTR pszBuffer,
1684  UINT uBuffSize);
1685 
1690 #ifdef UNICODE
1691 #define crGetLastErrorMsg crGetLastErrorMsgW
1692 #else
1693 #define crGetLastErrorMsg crGetLastErrorMsgA
1694 #endif //UNICODE
1695 
1696 
1698 
1699 #ifndef _CRASHRPT_NO_WRAPPERS
1700 
1747 {
1748 public:
1749 
1751  CrAutoInstallHelper(__in PCR_INSTALL_INFOA pInfo)
1752  {
1753  m_nInstallStatus = crInstallA(pInfo);
1754  }
1755 
1757  CrAutoInstallHelper(__in PCR_INSTALL_INFOW pInfo)
1758  {
1759  m_nInstallStatus = crInstallW(pInfo);
1760  }
1761 
1764  {
1765  if(m_nInstallStatus==0)
1766  crUninstall();
1767  }
1768 
1771 };
1772 
1799 {
1800 public:
1801 
1803  CrThreadAutoInstallHelper(DWORD dwFlags=0)
1804  {
1805  m_nInstallStatus = crInstallToCurrentThread2(dwFlags);
1806  }
1807 
1810  {
1811  if (m_nInstallStatus == 0)
1813  }
1814 
1817 };
1818 
1819 #endif
1820 
1821 #endif //_CRASHRPT_H_
1822 
1823 
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&#39; 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