DoctorDumpSDK
|
To enable crash processing you should create an instance of this class. More...
#include <CrashRpt.h>
Public Member Functions | |
CrashRpt (LPCSTR applicationGUID, LPCWSTR appName, LPCWSTR company) throw () | |
CrashRpt (LPCSTR applicationGUID, LPCSTR prefix, LPCWSTR appName, LPCWSTR company, BOOL ownProcess=TRUE) throw () | |
CrashRpt (LPCWSTR crashrptPath, LPCSTR applicationGUID, LPCSTR prefix, LPCWSTR appName, LPCWSTR company, BOOL ownProcess=TRUE) throw () | |
CrashRpt (ApplicationInfo *applicationInfo, HandlerSettings *handlerSettings, BOOL ownProcess=TRUE) throw () | |
CrashRpt (LPCWSTR crashrptPath, ApplicationInfo *applicationInfo, HandlerSettings *handlerSettings, BOOL ownProcess=TRUE) throw () | |
CrashRpt (LPCWSTR crashrptPath=NULL) throw () | |
~CrashRpt () | |
bool | IsCrashHandlingEnabled () const |
bool | InitCrashRpt (ApplicationInfo *applicationInfo, HandlerSettings *handlerSettings, BOOL ownProcess=TRUE) throw () |
bool | InitCrashRpt (LPCSTR applicationGUID, LPCSTR prefix, LPCWSTR appName, LPCWSTR company, BOOL ownProcess=TRUE) throw () |
bool | SetCustomInfo (LPCWSTR text) |
bool | AddUserInfoToReport (LPCWSTR key, LPCWSTR value) throw () |
bool | RemoveUserInfoFromReport (LPCWSTR key) |
bool | AddFileToReport (LPCWSTR path, LPCWSTR reportFileName) throw () |
bool | RemoveFileFromReport (LPCWSTR path) throw () |
bool | GetVersionFromApp (ApplicationInfo *appInfo) throw () |
bool | GetVersionFromFile (LPCWSTR path, ApplicationInfo *appInfo) throw () |
LONG | SendReport (EXCEPTION_POINTERS *exceptionPointers) |
void | SkipDoctorDump_SendAssertionViolated (LPCSTR dumpGroup=NULL) const |
Static Public Attributes | |
static const DWORD | ExceptionAssertionViolated = ((DWORD)0xCCE17000) |
static const DWORD | ExceptionCppTerminate = ((DWORD)0xCCE17001) |
Exception code for Terminate()/SIGABRT call in crash callback. | |
static const DWORD | ExceptionPureCall = ((DWORD)0xCCE17002) |
Exception code for pure virtual call in crash callback. | |
static const DWORD | ExceptionInvalidParameter = ((DWORD)0xCCE17003) |
Exception code for CRT invalid parameter call in crash callback. | |
To enable crash processing you should create an instance of this class.
It should be created as global static object and correctly initialized. Also you may instantiate it in your main() or WinMain() function as soon as possible.
|
inline |
CrashRpt constructor. Loads crashrpt.dll and initializes crash handling.
[in] | applicationGUID | GUID assigned to this application. |
[in] | appName | Application name that will be shown in message box. |
[in] | company | Company name that will be shown in message box. |
|
inline |
CrashRpt constructor. Loads crashrpt.dll and initializes crash handling.
[in] | applicationGUID | GUID assigned to this application. |
[in] | prefix | Prefix that will be used with the dump name: YourPrefix_v1.v2.v3.v4_YYYYMMDD_HHMMSS.mini.dmp. |
[in] | appName | Application name that will be shown in message box. |
[in] | company | Company name that will be shown in message box. |
[in] | ownProcess | If you own the process your code running in set this option to TRUE. If don't (for example you write a plugin to some external application) set this option to FALSE. In that case you need to explicitly catch exceptions. See SendReport for more information. |
|
inline |
CrashRpt constructor. Loads crashrpt.dll and initializes crash handling.
[in] | crashrptPath | Path to crashrpt.dll file. File may be renamed. |
[in] | applicationGUID | GUID assigned to this application. |
[in] | prefix | Prefix that will be used with the dump name: YourPrefix_v1.v2.v3.v4_YYYYMMDD_HHMMSS.mini.dmp. |
[in] | appName | Application name that will be shown in message box. |
[in] | company | Company name that will be shown in message box. |
[in] | ownProcess | If you own the process your code running in set this option to TRUE. If don't (for example you write a plugin to some external application) set this option to FALSE. In that case you need to explicitly catch exceptions. See SendReport for more information. |
|
inline |
CrashRpt constructor. Loads crashrpt.dll and initializes crash handling.
[in] | applicationInfo | Pointer to the ApplicationInfo structure that identifies your application. |
[in] | handlerSettings | Pointer to the HandlerSettings structure that customizes crash handling behavior. This parameter can be NULL. |
[in] | ownProcess | If you own the process your code running in set this option to TRUE. If don't (for example you write a plugin to some external application) set this option to FALSE. In that case you need to explicitly catch exceptions. See SendReport for more information. |
|
inline |
CrashRpt constructor. Loads crashrpt.dll and initializes crash handling.
[in] | crashrptPath | Path to crashrpt.dll file. File may be renamed. |
[in] | applicationInfo | Pointer to the ApplicationInfo structure that identifies your application. |
[in] | handlerSettings | Pointer to the HandlerSettings structure that customizes crash handling behavior. This parameter can be NULL. |
[in] | ownProcess | If you own the process your code running in set this option to TRUE. If don't (for example you write a plugin to some external application) set this option to FALSE. In that case you need to explicitly catch exceptions. See SendReport for more information. |
|
inline |
CrashRpt constructor. Loads crashrpt.dll. You should call InitCrashRpt to turn on crash handling.
[in] | crashrptPath | Path to crashrpt.dll file. File may be renamed. |
|
inline |
CrashRpt destructor.
|
inline |
You may add any file to crash report. This file will be read when crash appears and will be sent within the report. Multiple files may be added. Filename of the file in the report may be changed to any name.
[in] | path | Path to the file, that will be added to the report. |
[in] | reportFileName | Filename that will be used in report for this file. If parameter is NULL, original name from path will be used. |
|
inline |
You may add any key/value pair to crash report.
[in] | key | key string that will be added to the report. |
[in] | value | value for the key. |
|
inline |
Fills version field (V) of ApplicationInfo with product version found in the executable file of the current process.
[out] | appInfo | Pointer to ApplicationInfo structure. Its version field (V) will be set to product version. |
|
inline |
Fill version field (V) of ApplicationInfo with product version found in the file specified.
[in] | path | Path to the file product version will be extracted from. |
[out] | appInfo | Pointer to ApplicationInfo structure. Its version field (V) will be set to product version. |
|
inline |
Initializes crash handler.
[in] | applicationInfo | Pointer to the ApplicationInfo structure that identifies your application. |
[in] | handlerSettings | Pointer to the HandlerSettings structure that customizes crash handling behavior. This parameter can be NULL. |
[in] | ownProcess | If you own the process your code running in set this option to TRUE. If don't (for example you write a plugin to some external application) set this option to FALSE. In that case you need to explicitly catch exceptions. See SendReport for more information. |
|
inline |
Initializes crash handler.
[in] | applicationGUID | GUID assigned to this application. |
[in] | prefix | Prefix that will be used with the dump name: YourPrefix_v1.v2.v3.v4_YYYYMMDD_HHMMSS.mini.dmp. |
[in] | appName | Application name that will be shown in message box. |
[in] | company | Company name that will be shown in message box. |
[in] | ownProcess | If you own the process your code running in set this option to TRUE. If don't (for example you write a plugin to some external application) set this option to FALSE. In that case you need to explicitly catch exceptions. See SendReport for more information. |
|
inline |
Checks that crash handling was enabled.
|
inline |
Remove from report the file that was registered earlier to be sent within report.
[in] | path | Path to the file, that will be removed from the report. |
|
inline |
You may remove any key that was added previously to crash report by AddUserInfoToReport.
[in] | key | key string that will be removed from the report. |
|
inline |
If you do not own the process your code running in (for example you write a plugin to some external application) you need to properly initialize CrashRpt using ownProcess option. Also you need to explicitly catch all exceptions in all entry points to your code and in all threads you create. To do so use this construction:
[in] | exceptionPointers | Pointer to EXCEPTION_POINTERS structure. You should get it using GetExceptionInformation() function inside __except keyword. |
|
inline |
You may set custom information for your possible report. This text will be available on Doctor Dump dumps page. The text should not contain private information.
[in] | text | custom info for the report. The text will be cut to 100 characters. |
|
inline |
Sends assertion violation report from this point and continue execution.
[in] | dumpGroup | All dumps with that group will be separated from dumps with same stack but another group. Set parameter to NULL if no grouping is required. |
|
static |
To send a report about violated assertion you can throw exception with this exception code using:
Execution will continue after report will be sent (EXCEPTION_CONTINUE_EXECUTION would be used). You may pass grouping string as first parameter (see SkipDoctorDump_SendAssertionViolated).