| GME
    13
    | 
Installs exception handlers in constructor and uninstalls in destructor. More...
#include <CrashRpt.h>
| 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. | |
| Public Attributes | |
| int | m_nInstallStatus | 
| Install status. | |
Installs exception handlers in constructor and uninstalls in destructor.
This wrapper class calls crInstall() in its constructor and calls crUninstall() in its destructor.
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 ... }
Definition at line 1546 of file CrashRpt.h.
| CrAutoInstallHelper::CrAutoInstallHelper | ( | PCR_INSTALL_INFOA | pInfo | ) |  [inline] | 
Installs exception handlers to the caller process.
Definition at line 1551 of file CrashRpt.h.
| CrAutoInstallHelper::CrAutoInstallHelper | ( | PCR_INSTALL_INFOW | pInfo | ) |  [inline] | 
Installs exception handlers to the caller process.
Definition at line 1557 of file CrashRpt.h.
| CrAutoInstallHelper::~CrAutoInstallHelper | ( | ) |  [inline] | 
Uninstalls exception handlers from the caller process.
Definition at line 1563 of file CrashRpt.h.
Install status.
Definition at line 1569 of file CrashRpt.h.
 1.7.6.1
 1.7.6.1