crashrpt | ||
A crash reporting system for Windows applications |
Public Member Functions | |
CrAutoInstallHelper (PCR_INSTALL_INFOA pInfo) | |
Installs exception handlers to the caller process. | |
CrAutoInstallHelper (PCR_INSTALL_INFOW pInfo) | |
Installs exception handlers to the caller process. | |
~CrAutoInstallHelper () | |
Uninstalls exception handlers from the caller process. | |
Data Fields | |
int | m_nInstallStatus |
Install status. |
Use CrAutoInstallHelper::m_nInstallStatus member to check the return status of crInstall().
Example:
#include <CrashRpt.h> void main() { CR_INSTALL_INFO info; memset(&info, 0, sizeof(CR_INSTALL_INFO)); info.cb = sizeof(CR_INSTALL_INFO); info.pszAppName = _T("My App Name"); info.pszAppVersion = _T("1.2.3"); info.pszEmailSubject = "Error Report from My App v.1.2.3"; // The address to send reports by E-mail info.pszEmailTo = _T("myname@hotmail.com"); // The URL to send reports via HTTP connection info.pszUrl = _T("http://myappname.com/utils/crashrpt.php"); info.pfnCrashCallback = CrashCallback; info.uPriorities[CR_HTTP] = 3; // Try HTTP first info.uPriorities[CR_SMTP] = 2; // Try SMTP second info.uPriorities[CR_SMAPI] = 1; // Try system email program last // Install crash reporting CrAutoInstallHelper cr_install_helper(&info); // Check that installed OK assert(cr_install_helper.m_nInstallStatus==0); // Your code follows here ... }