Click here to Skip to main content
15,896,526 members
Articles / Web Development / HTML

Integrating Crash Reporting into Your Application - A Beginners Tutorial

Rate me:
Please Sign up or sign in to vote.
4.91/5 (30 votes)
5 Feb 2012CPOL12 min read 90.8K   4.4K   170  
This article shows how to use CrashRpt error reporting library with an MFC application
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>CrashRpt: Using CrashRptProbe API</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>

<table border="0" bgcolor="#FFFFFF" cellspacing="5" width="100%">
 <tr>
  <td width="24px" rowspan="2"><img src="../logo.png" alt="Logo" /></td>
  <td><font family="Arial" size="+2">crashrpt</font></td>
  <td rowspan="2" align="right"><a href="http://sourceforge.net/donate/index.php?group_id=279722"><img src="../donate_small.png" alt="Donate" /></a></td>
 </tr>
 <tr>
  <td colspan="2"><i>A crash reporting system for Windows applications</i></td>
 </tr>


</table>


</body>
<!-- Generated by Doxygen 1.5.9 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Contents</span></a></li>
      <li><a href="modules.html"><span>API&nbsp;Reference</span></a></li>
      <li><a href="files.html"><span>File&nbsp;Reference</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="index.html">CrashRpt Documentation</a>&nbsp;&raquo&nbsp;<a class="el" href="using_error_reports.html">Using Error Reports</a>&nbsp;&raquo&nbsp;<a class="el" href="automating_crash_report_processing.html">Automating Crash Report Processing</a>
  </div>
</div>
<div class="contents">
<h1><a class="anchor" name="using_crashrptprobe_api">Using CrashRptProbe API </a></h1>This page describes the application programming interface (API) for processing error reports generated by CrashRpt. The API is used internally by the <b>crprober.exe</b> tool presented in the previous section.<p>
The error report processing functionality is encapsulated inside of <b>CrashRptProbe.dll</b>. Internally CrashRptProbe uses the functions provided by <b>dbghelp.dll</b> (Microsoft Debug Help Library) for loading the minidump file contained in the report.<p>
The CrashRptProbe provides several functions you can use in your own error report processing tool (see <a class="el" href="group___crash_rpt_probe_a_p_i.html">CrashRptProbe Functions</a>). All CrashRptProbe functions have <code>crp</code> prefix in function name, constants have <code>CRP</code> prefix and types have <code>Crp</code> prefix.<p>
All CrashRptProbe functions using character set dependent arguments have two versions of function name (multi-byte versions are A-suffixed and wide character versions are W-suffixed). For example, <a class="el" href="group___crash_rpt_probe_a_p_i.html#g0e45570a3b25c6c5f8971b3179c5fdbf" title="Character set-independent mapping of crpGetPropertyW() and crpGetPropertyA() functions...">crpGetProperty()</a> function has two versions of function name: <a class="el" href="group___crash_rpt_probe_a_p_i.html#ga2290539d9f2123210f253cbde4f54f1">crpGetPropertyA()</a> and <a class="el" href="group___crash_rpt_probe_a_p_i.html#gdfba1379d47b16d3ea5777badf1cf736" title="Retrieves a string property from crash report.">crpGetPropertyW()</a>. Typically you use a character set independent mapping of function name in your program, for example use <a class="el" href="group___crash_rpt_probe_a_p_i.html#g0e45570a3b25c6c5f8971b3179c5fdbf" title="Character set-independent mapping of crpGetPropertyW() and crpGetPropertyA() functions...">crpGetProperty()</a> that expands into <a class="el" href="group___crash_rpt_probe_a_p_i.html#gdfba1379d47b16d3ea5777badf1cf736" title="Retrieves a string property from crash report.">crpGetPropertyW()</a> if you use wide character set or into <a class="el" href="group___crash_rpt_probe_a_p_i.html#ga2290539d9f2123210f253cbde4f54f1">crpGetPropertyA()</a> if you use multi-byte character set.<h2><a class="anchor" name="crprobe_include_and_lib_files">
Include and Lib Files</a></h2>
At this point you should have CrashRpt solution's source code compiled as described <a class="el" href="compiling_crashrpt.html">Compiling CrashRpt</a>.<p>
Configure your Visual Studio directories as described in below:<p>
In Visual Studio window, open <em>Tools-&gt; Options-&gt;Projects and Solutions-&gt;VC++ Directories</em>.<ul>
<li>In the 'Show directories for' combo box, select 'Include files', then add the path to <em>[CRASHRPT_HOME]\include</em> directory to the list.</li><li>In the 'Show directories for' combo box, select 'Library files', then add the path to <em>[CRASHRPT_HOME]\lib</em> directory to the list.</li></ul>
<p>
Here <em>[CRASHRPT_HOME]</em> should be replaced with the actual path of the directory you unzipped CrashRpt package to.<p>
Include the <a class="el" href="_crash_rpt_probe_8h.html">CrashRptProbe.h</a> header file in the beginning of your code in order to use CrashRptProbe API in your crash report processing program.<p>
<div class="fragment"><pre class="fragment"><span class="comment">//Include CrashRptProbe header in the beginning of your code</span>
<span class="preprocessor">#include &lt;<a class="code" href="_crash_rpt_probe_8h.html" title="Defines the interface for the CrashRptProbe.DLL.">CrashRptProbe.h</a>&gt;</span>
</pre></div><p>
Add <b>CrashRptProbe.lib</b> file to the list of input libraries for your project. In the Solution Explorer window, right-click your project and choose Properties item in the context menu. Then open <em>Configuration Properties-&gt;Linker-&gt;Input-&gt;Additional Dependencies</em> and then add <b>CrashRptProbe.lib</b> to the list of libraries.<h2><a class="anchor" name="opening_and_closing_error_reports">
Opening and Closing Error Reports</a></h2>
Error report files are normal ZIP archives containing several files as described in <a class="el" href="error_report.html">About an Error Report</a>. To open an error report file, you use the <a class="el" href="group___crash_rpt_probe_a_p_i.html#g6321942ac8b4635b13300df5219cac6e" title="Character set-independent mapping of crpOpenErrorReportW() and crpOpenErrorReportA()...">crpOpenErrorReport()</a> function. The function returns the handle to the opened report as <a class="el" href="_crash_rpt_probe_8h.html#2b2d28276d67dd476ea8aa9c45669d82">CrpHandle</a> type, which is an integer number identifying the opened report. You pass the handle to other CrashRptProbe functions.<p>
When you have retrieved all the data you need, close the report. To close previously opened error report, you use <a class="el" href="group___crash_rpt_probe_a_p_i.html#g0e7fd985622aae142ead686d5380c6c5" title="Closes the crash report.">crpCloseErrorReport()</a> function.<h2><a class="anchor" name="retrieving_report_properties">
Retrieving Error Report Properties</a></h2>
You can think of the error report as a set of properties. All properties are organized into tables consisting of rows and columns. Each property is a text string. But sometimes you might need to convert text properties to some other types for further processing.<p>
The list of table IDs you can use is presented below in <a class="el" href="using_crashrptprobe_api.html#list_of_table_ids">The List of Table IDs</a> section. Table IDs are actually strings, but we use aliases for convenience. For example, <a class="el" href="_crash_rpt_probe_8h.html#06fd07f7a9ad9d549708aa3bedb68061">CRP_TBL_XMLDESC_MISC</a> expands into "XmlDescMisc" string.<p>
The list of table IDs is not fixed. There may be additional tables in the report, and you can determine their IDs at run time only. For example, each execution thread has the stack trace. The stack trace is the table containing a collection of stack frames. You can retrieve table IDs of the stack trace of each thread from <a class="el" href="_crash_rpt_probe_8h.html#57c9d3fe736ed0f2b77f22422a865c06">CRP_TBL_MDMP_THREADS</a> table.<p>
Each table may have several rows. The <a class="el" href="_crash_rpt_probe_8h.html#06fd07f7a9ad9d549708aa3bedb68061">CRP_TBL_XMLDESC_MISC</a> and <a class="el" href="_crash_rpt_probe_8h.html#d001f9f10bafbacf60c9c2f6b06b796d">CRP_TBL_MDMP_MISC</a> tables always have single row. Other ones may have more than one row. You can determine the number of rows in the table by passing special constant <a class="el" href="_crash_rpt_probe_8h.html#37d896e593fa4667d38907b2adb98372">CRP_META_ROW_COUNT</a> to the <a class="el" href="group___crash_rpt_probe_a_p_i.html#g0e45570a3b25c6c5f8971b3179c5fdbf" title="Character set-independent mapping of crpGetPropertyW() and crpGetPropertyA() functions...">crpGetProperty()</a> function, as shown in the example below:<p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &lt;<a class="code" href="_crash_rpt_probe_8h.html" title="Defines the interface for the CrashRptProbe.DLL.">CrashRptProbe.h</a>&gt;</span>

<span class="comment">// It is assumed the handle to the opened error report is stored in hReport variable.</span>
<a class="code" href="_crash_rpt_probe_8h.html#2b2d28276d67dd476ea8aa9c45669d82" title="Handle to an opened error report.">CrpHandle</a> hReport;

<span class="comment">// Get row count in the Modules table.</span>
<span class="comment">// The return value is non-negative on success.</span>
<span class="keywordtype">int</span> nRowCount = <a class="code" href="group___crash_rpt_probe_a_p_i.html#g0e45570a3b25c6c5f8971b3179c5fdbf" title="Character set-independent mapping of crpGetPropertyW() and crpGetPropertyA() functions...">crpGetProperty</a>(hReport, <a class="code" href="_crash_rpt_probe_8h.html#f6846fd2538956b0f7fba6f1b2ce7d8f" title="Table: The list of loaded modules.">CRP_TBL_MDMP_MODULES</a>, 
                    <a class="code" href="_crash_rpt_probe_8h.html#37d896e593fa4667d38907b2adb98372" title="Row count in the table.">CRP_META_ROW_COUNT</a>, 0, NULL, 0, NULL);
</pre></div><p>
Each table has several columns. Column IDs are actually strings, but we use aliases for convenience. For example, <a class="el" href="_crash_rpt_probe_8h.html#c016feb498b37c39f603461718fd7961">CRP_COL_APP_NAME</a> expands into "AppName" string.<p>
The list of available column IDs for each table is presented in the following sections below:<ul>
<li><a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_xmldescmisc">The List of Column IDs of the CRP_TBL_XMLDESC_MISC Table</a></li><li><a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_xmldesccustomprops">The List of Column IDs of the CRP_TBL_XMLDESC_CUSTOM_PROPS Table</a></li><li><a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_xmldescfileitems">The List of Column IDs of the CRP_TBL_XMLDESC_FILE_ITEMS Table</a></li><li><a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_mdmpmisc">The List of Column IDs of the CRP_TBL_MDMP_MISC Table</a></li><li><a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_mdmpmodules">The List of Column IDs of the CRP_TBL_MDMP_MODULES Table</a></li><li><a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_mdmpthreads">The List of Column IDs of the CRP_TBL_MDMP_THREADS Table</a></li><li><a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_stacktrace">The List of Column IDs of a Stack Trace Table</a></li><li><a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_mdmploadlog">The List of Column IDs of the CRP_MDMP_LOAD_LOG Table</a></li></ul>
<p>
To retrieve a property from the report, you use the <a class="el" href="group___crash_rpt_probe_a_p_i.html#g0e45570a3b25c6c5f8971b3179c5fdbf" title="Character set-independent mapping of crpGetPropertyW() and crpGetPropertyA() functions...">crpGetProperty()</a> function. You pass table ID, column ID and row ID identifying the property to this function, and receive the value to the text buffer (see the following example).<p>
The number of columns is not fixed, it depends on what version of CrashRpt generated the report, and on various other factors.<p>
If there is no such table or there is no such column in the table, or row index is invalid, the <a class="el" href="group___crash_rpt_probe_a_p_i.html#g0e45570a3b25c6c5f8971b3179c5fdbf" title="Character set-independent mapping of crpGetPropertyW() and crpGetPropertyA() functions...">crpGetProperty()</a> function fails. Check the return code to ensure the property is retrieved successfully.<p>
The following code example shows how to retrieve a property from error report:<p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &lt;<a class="code" href="_crash_rpt_probe_8h.html" title="Defines the interface for the CrashRptProbe.DLL.">CrashRptProbe.h</a>&gt;</span>

<span class="comment">// It is assumed the handle to the opened error report is stored in hReport variable.</span>
<a class="code" href="_crash_rpt_probe_8h.html#2b2d28276d67dd476ea8aa9c45669d82" title="Handle to an opened error report.">CrpHandle</a> hReport;

<span class="keyword">const</span> <span class="keywordtype">int</span> BUFF_SIZE = 1024;
TCHAR szBuffer[BUFF_SIZE];  

<span class="comment">// Get the count of processors on user's machine.</span>
<span class="keywordtype">int</span> nResult = <a class="code" href="group___crash_rpt_probe_a_p_i.html#g0e45570a3b25c6c5f8971b3179c5fdbf" title="Character set-independent mapping of crpGetPropertyW() and crpGetPropertyA() functions...">crpGetProperty</a>(hReport, <a class="code" href="_crash_rpt_probe_8h.html#d001f9f10bafbacf60c9c2f6b06b796d" title="Table: Miscellaneous info contained in crash minidump file.">CRP_TBL_MDMP_MISC</a>, 
                <a class="code" href="_crash_rpt_probe_8h.html#c2498bce49cb824ccbdf4bbaf8f23ae4" title="Column: Number of processors.">CRP_COL_CPU_COUNT</a>, 0, szBuffer, BUFF_SIZE, NULL);
</pre></div><p>
For additional code examples, please see <a class="el" href="crashrptprobe_api_examples.html">Examples of Using CrashRptProbe API</a>.<h2><a class="anchor" name="retrieving_report_files">
Retrieving Files Contained in the Error Report</a></h2>
An error report is a ZIP archive containing several files. The files are: crash minidump file (.dmp), crash report description file (.xml) and optional application-defined files, such as application log file.<p>
To enumerate files contained in report, you use <a class="el" href="_crash_rpt_probe_8h.html#8c66617a7f801165edb294da48c5575b">CRP_TBL_XMLDESC_FILE_ITEMS</a> table.<p>
To extract a file from the ZIP archive by its file name, you use <a class="el" href="group___crash_rpt_probe_a_p_i.html#g237fcf61f3027bb315c54bf82e3779d2" title="Character set-independent mapping of crpExtractFileW() and crpExtractFileA() functions...">crpExtractFile()</a> function.<h2><a class="anchor" name="handling_crprobe_errors">
Handling Errors</a></h2>
Typically a CrashRptProbe API function returns zero value if succeeded and non-zero if failed. To get text error message of the last called function, use <a class="el" href="group___crash_rpt_probe_a_p_i.html#g0d9c05a90d82156c237f6d50bb2157c6" title="Defines character set-independent mapping for crpGetLastErrorMsgW() and crpGetLastErrorMsgA()...">crpGetLastErrorMsg()</a>.<h2><a class="anchor" name="crashrptprobe_api_reference">
CrashRptProbe API Reference</a></h2>
<ul>
<li><a class="el" href="group___crash_rpt_probe_a_p_i.html">CrashRptProbe Functions</a></li></ul>
<h2><a class="anchor" name="list_of_table_ids">
The List of Table IDs</a></h2>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>Table ID</b> </td><td><b>Description</b> <p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#06fd07f7a9ad9d549708aa3bedb68061">CRP_TBL_XMLDESC_MISC</a> </td><td>This table contains miscellaneous information retrieved from XML crash description file. For the list of columns this table may contain, see <a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_xmldescmisc">The List of Column IDs of the CRP_TBL_XMLDESC_MISC Table</a>. <p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#15c164df5612d1e66482fd1c3c7896e7">CRP_TBL_XMLDESC_CUSTOM_PROPS</a> </td><td>This table contains the list of application-defined properties (available since v.1.2.1).. For the list of columns this table may contain, see <a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_xmldesccustomprops">The List of Column IDs of the CRP_TBL_XMLDESC_CUSTOM_PROPS Table</a>. <p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#8c66617a7f801165edb294da48c5575b">CRP_TBL_XMLDESC_FILE_ITEMS</a> </td><td>This table contains the list of files contained in the error report. For the list of columns this table may contain, see <a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_xmldescfileitems">The List of Column IDs of the CRP_TBL_XMLDESC_FILE_ITEMS Table</a>. <p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#d001f9f10bafbacf60c9c2f6b06b796d">CRP_TBL_MDMP_MISC</a> </td><td>This table contains miscellaneous information retrieved from crash minidump file. For the list of columns this table may contain, see <a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_mdmpmisc">The List of Column IDs of the CRP_TBL_MDMP_MISC Table</a>. <p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#f6846fd2538956b0f7fba6f1b2ce7d8f">CRP_TBL_MDMP_MODULES</a> </td><td>This table contains the list of loaded modules retrieved from crash minidump file. For the list of columns this table may contain, see <a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_mdmpmodules">The List of Column IDs of the CRP_TBL_MDMP_MODULES Table</a>. <p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#57c9d3fe736ed0f2b77f22422a865c06">CRP_TBL_MDMP_THREADS</a> </td><td>This table contains the list of threads retrieved from crash minidump file. For the list of columns this table may contain, see <a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_mdmpthreads">The List of Column IDs of the CRP_TBL_MDMP_THREADS Table</a>. <p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#4bb886cd65824e74b0d970caed608331">CRP_TBL_MDMP_LOAD_LOG</a> </td><td>This table contains the minidump loading log. For the list of columns this table may contain, see <a class="el" href="using_crashrptprobe_api.html#list_of_column_ids_for_mdmploadlog">The List of Column IDs of the CRP_MDMP_LOAD_LOG Table</a>. <p>
</td></tr>
</table>
<h2><a class="anchor" name="list_of_column_ids_for_xmldescmisc">
The List of Column IDs of the CRP_TBL_XMLDESC_MISC Table</a></h2>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>Column ID</b> </td><td><b>Description</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#9d54fafc774b44f11c62bdf2094f6483">CRP_COL_CRASHRPT_VERSION</a> </td><td><p>
Example values: "1000" (v1.0), "1100" (v1.1b), "1101" (v1.1.1), "1102" (v1.1.2), "1103" (v1.1.3), "1200" (v1.2.0).<p>
Use this property to get the version of CrashRpt library that generated the error report. For example, "1000" means the report was generated using old v1.0, and "1103" means the report was generated using v1.1.3.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#e40451e87a008b5e5000849c9d8a0754">CRP_COL_CRASH_GUID</a> </td><td><p>
Example value: "0b3b0c1b-3450-4c39-9459-42221ae66460"<p>
This property represents the globally unique identifier (GUID) assigned to the error report.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#c016feb498b37c39f603461718fd7961">CRP_COL_APP_NAME</a><p>
</td><td><p>
Examples: "My Application", "myapp"<p>
Represents the name of the application name this report was generated for.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#58e3ea15403e1731e689f4ee03c66d1e">CRP_COL_APP_VERSION</a><p>
</td><td><p>
Examples: "6.1.0.200", "1.3.5"<p>
Application version this report was generated for.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#564fc8d0c66adbed0501fa4ef7b5d906">CRP_COL_IMAGE_NAME</a> </td><td>Example: "C:\Program Files\My Application\MyApp.exe"<p>
Path to the executable file.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#26106c7ca84257cbbee98506df706a2e">CRP_COL_OPERATING_SYSTEM</a> </td><td><p>
Examples:"Windows XP Build 2600 Service Pack 3", "Windows 7 Ultimate Build 7100"<p>
Operating system name, including build number and service pack. This value is taken from end user's registry.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#5f187d659fbaff1c4f74ab9b66141d76">CRP_COL_SYSTEM_TIME_UTC</a><p>
</td><td>Example: "2009-06-28T04:47:32Z"<p>
Time (UTC) when the crash had occurred, including year, month, day, hour, min and sec.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#5e8805e0a2a80159d480535609892118">CRP_COL_EXCEPTION_TYPE</a> </td><td>Examples: "0 SEH exception", "1 terminate call".<p>
Code of exception handler that caught the exception followed by short description. For the list of possible exception types, see <a class="el" href="using_crash_descriptor.html">Using Crash Description XML</a>.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#5adc3a15973ae8dd6fdd560bc50f101f">CRP_COL_EXCEPTION_CODE</a> </td><td>Example: "0xc0000005 Access violation reading location."<p>
Exception code; for the SEH exceptions only. Hexadecimal number followed by the textual description.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#3a8124594b6a70413f309a72a2896865">CRP_COL_INVPARAM_FUNCTION</a> </td><td>Example: "_stprintf_s".<p>
Function name; for invalid parameter errors only.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#f6f6c9eb4e3795ebaff7d23c5ea95f85">CRP_COL_INVPARAM_EXPRESSION</a> </td><td>Example: "sizeOfBuffer!=0"<p>
Expression; for invalid parameter errors only.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#17ab06fdf7ba42dc253d0d870512a173">CRP_COL_INVPARAM_FILE</a> </td><td>Example: "invarg.c"<p>
Source file name; for invalid parameter errors only.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#8570aada0985ef9481b18fa117bf3830">CRP_COL_INVPARAM_LINE</a> </td><td>Example: "25"<p>
Source line number; decimal number; for invalid parameter errors only.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#53428ea86bfed908f0aa3354289b0331">CRP_COL_FPE_SUBCODE</a> </td><td>Example: "0x81"<p>
Sub-code of floating point exception, hexadecimal number. For FPE exceptions only. For the list of possible FPE sub-codes, see the documentation of <b>signal</b> function in MSDN or <code>FPE_-prefixed</code> constants in &lt;float.h&gt; header.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#b5b63cc889234878849639d7fbf67294">CRP_COL_USER_EMAIL</a> </td><td>Example: "example@hotmail.com"<p>
Email of the user who sent this report.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#34ae84923a59f83586e0c737a021b59e">CRP_COL_PROBLEM_DESCRIPTION</a> </td><td>Example: "I don't know"<p>
User-provided problem description.<p>
This property may present in reports generated by <b>CrashRpt v1.1b and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#dbe3d39e984cfcd1bffc046e79ca0a6f">CRP_COL_GEO_LOCATION</a> </td><td>Example: "en-us"<p>
Geographic location of the error report sender in an RFC 1766 compliant form. This property is a string consisting of two parts separated with `-` symbol. The first part is the language abbreviation, the second is country name abbreviation.<p>
This property may present in reports generated by <b>CrashRpt v1.2.7 and later</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#c21c5c46979dc6e980c66d3ea9513cfb">CRP_COL_OS_IS_64BIT</a> </td><td>Example: "1" or "0"<p>
Equals to 1 if user's OS is 64-bit, otherwize equals to 0.<p>
This property may present in reports generated by <b>CrashRpt v1.2.7 and later</b><p>
</td></tr>
</table>
<h2><a class="anchor" name="list_of_column_ids_for_xmldesccustomprops">
The List of Column IDs of the CRP_TBL_XMLDESC_CUSTOM_PROPS Table</a></h2>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>Column ID</b> </td><td><b>Description</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#34f50605aed2a6fdb6fabdb78a5fec0f">CRP_COL_PROPERTY_NAME</a> </td><td>Example: "VideoAdapter"<p>
This represents the name of a user-defined property.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#7a6b0e11be980e1c25e385805dafcd6a">CRP_COL_PROPERTY_VALUE</a> </td><td>Example: "NVIDIA GeForce GTX 295"<p>
Value of the user-defined property.<p>
</td></tr>
</table>
<h2><a class="anchor" name="list_of_column_ids_for_xmldescfileitems">
The List of Column IDs of the CRP_TBL_XMLDESC_FILE_ITEMS Table</a></h2>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>Column ID</b> </td><td><b>Description</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#3812964f7e0aedfbc71b7f0ecf88d617">CRP_COL_FILE_ITEM_NAME</a> </td><td>Example: "crashdump.dmp"<p>
This property represents the name of a file contained in the error report.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#9ac7d60a02510e1e2b4c045f4c0b1f53">CRP_COL_FILE_ITEM_DESCRIPTION</a> </td><td>Example: "Crash Dump"<p>
Description of a file contained in the report.<p>
</td></tr>
</table>
<h2><a class="anchor" name="list_of_column_ids_for_mdmpmisc">
The List of Column IDs of the CRP_TBL_MDMP_MISC Table</a></h2>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>Column ID</b> </td><td><b>Description</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#cb52cc4f9d89d54b8be7e79f1d7f7a8f">CRP_COL_CPU_ARCHITECTURE</a> </td><td>Example: "0 x86"<p>
Processor architecture. Decimal number followed by textual description. Possible values are: "0 x86", "6 Intel Itanium Processor Family (IPF)", "9 x64 (AMD or Intel)", "10 WOW"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#c2498bce49cb824ccbdf4bbaf8f23ae4">CRP_COL_CPU_COUNT</a> </td><td>Example: "1"<p>
Number of processors. Decimal number equal or greater than one.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#401eea5e54f9f0d5d201eba326cde07d">CRP_COL_PRODUCT_TYPE</a> </td><td>Examples: "1 workstation", "2 domain controller", "3 server"<p>
Type of end user's system (server, domain controller or workstation). Decimal number followed by textual description.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#305d537c8055c3d95aa1735ad32b578b">CRP_COL_OS_VER_MAJOR</a> </td><td><p>
Example: "6"<p>
OS major version. Decimal number. Equals to "5" for Win2000/XP, "6" for Vista/Windows 7.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#45d9802c84d8c7f2be073ac0d5a1c986">CRP_COL_OS_VER_MINOR</a> </td><td>Examples: "0", "1"<p>
OS minor version. Used in combination with major version.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#0dddc2b05d4ca2892426deb05a3b4375">CRP_COL_OS_VER_BUILD</a> </td><td>Example: "2600"<p>
OS build number.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#8fdd660952ea9d36722c66cf71e45a91">CRP_COL_OS_VER_CSD</a> </td><td>Example: "Service Pack 3"<p>
The latest service pack installed.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#72d947a453d3b5287f492cce03afc7e4">CRP_COL_EXCPTRS_EXCEPTION_CODE</a> </td><td>Example: "0xc000005 Access violation reading location."<p>
Code of the SEH exception. Hexadecimal value followed by textual description. Valid for SEH exceptions only. This value is taken from minidump file; it is assumed to be the same as <a class="el" href="_crash_rpt_probe_8h.html#5adc3a15973ae8dd6fdd560bc50f101f">CRP_COL_EXCEPTION_CODE</a> property taken form XML file.<p>
This value may be empty if there is no exception information contained in the minidump file.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#ddd0dbd38130b8de54b55a0c60577064">CRP_COL_EXCEPTION_ADDRESS</a> </td><td>Example: "0x284323407"<p>
Exception address. Hexadecimal value. This value may be empty if there is no exception information contained in the minidump file.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#a4ef51827e7229e738f87a47dd432bff">CRP_COL_EXCEPTION_THREAD_ROWID</a> </td><td>Example: "0"<p>
Row ID of the thread in which exception occurred. Decimal value. This value may be empty if there is no exception information contained in the minidump file.<p>
When not empty, convert this text value to <code>int</code> and use as row ID to retrieve the thread information from <a class="el" href="_crash_rpt_probe_8h.html#57c9d3fe736ed0f2b77f22422a865c06">CRP_TBL_MDMP_THREADS</a> table.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#feb7209ed3d780aa566fa4a2f7f20a11">CRP_COL_EXCEPTION_MODULE_ROWID</a> </td><td>Example: "12"<p>
Row ID of the module in which exception occurred. Decimal value. This value may be empty if there is no exception information contained in the minidump file. When not empty, convert this text value to <code>int</code> and use as row ID to retrieve the module information from <a class="el" href="_crash_rpt_probe_8h.html#f6846fd2538956b0f7fba6f1b2ce7d8f">CRP_TBL_MDMP_MODULES</a> table.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#029e74562e1342463ddade31d6990d3b">CRP_COL_EXCEPTION_THREAD_STACK_MD5</a> </td><td>Example: "1fe384ded60d27a03c7375e80a1d6f4e"<p>
An MD5 hash of the stack of exception thread. Only meaningful (having valid module name and symbol name) stack frames are selected to compute the hash. You can use this value to group error reports by similar stack traces of the exception thread.<p>
This value may be empty if there is no exception information contained in the minidump file.<p>
This property may present in reports generated by <b>CrashRpt v1.2.7 and later</b><p>
</td></tr>
</table>
<h2><a class="anchor" name="list_of_column_ids_for_mdmpmodules">
The List of Column IDs of the CRP_TBL_MDMP_MODULES Table</a></h2>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>Column ID</b> </td><td><b>Description</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#965d1dfd2cb14cdd5b26cead80692e99">CRP_COL_MODULE_NAME</a> </td><td>Short module name (filename+extension).<p>
Example: "ntdll.dll"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#4a8ca26a5492dd05f0fbbbe3e78dc601">CRP_COL_MODULE_IMAGE_NAME</a> </td><td>Path to module image file.<p>
Example: "C:\Program Files\MyApp\msvcr80.dll"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#619e31639ebed434ef6131acf23a86d5">CRP_COL_MODULE_BASE_ADDRESS</a> </td><td>Module base load address. Hexadecimal value.<p>
Example: "0x80000000"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#760306b026707b91e7adcceb2e76fd11">CRP_COL_MODULE_SIZE</a> </td><td>Module size in bytes. Decimal.<p>
Example: "560008"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#f535cc949670edfadd168f197d9893d5">CRP_COL_MODULE_LOADED_PDB_NAME</a> </td><td>Path to the PDB file loaded for this module or empty string if symbols not loaded.<p>
Example: "D:\CrashRptSaved\MyApp_v1.3.5\Sym\myapp.pdb"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#d21f2a90a78e034ccae0fa4488330fa2">CRP_COL_MODULE_LOADED_IMAGE_NAME</a> </td><td>Path to the image file loaded for this module or empty string if image was not loaded.<p>
Example: "D:\CrashRptSaved\MyApp_v1.3.5\bin\CrashRptTest.exe"<p>
This property may present in reports generated by <b>CrashRpt v1.2.8 and later</b><p>
</td></tr>
</table>
<h2><a class="anchor" name="list_of_column_ids_for_mdmpthreads">
The List of Column IDs of the CRP_TBL_MDMP_THREADS Table</a></h2>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>Column ID</b> </td><td><b>Description</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#aafd0bdebd39e932c003b954bc9e43f7">CRP_COL_THREAD_ID</a> </td><td>Thread identifier. Hexadecimal value. Thread ID is assigned on thread creation by <b>CreateThread()</b> WinAPI function.<p>
Example: "0x1ff"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#ca6b2a52907531385b9e46592d2435a7">CRP_COL_THREAD_STACK_TABLEID</a> </td><td>Table ID of the stack frace table for this thread. Decimal. Pass this string to <a class="el" href="group___crash_rpt_probe_a_p_i.html#g0e45570a3b25c6c5f8971b3179c5fdbf" title="Character set-independent mapping of crpGetPropertyW() and crpGetPropertyA() functions...">crpGetProperty()</a> as table ID.<p>
Example values are implementation specific.<p>
</td></tr>
</table>
<h2><a class="anchor" name="list_of_column_ids_for_stacktrace">
The List of Column IDs of a Stack Trace Table</a></h2>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>Column ID</b> </td><td><b>Description</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#cfe4f1c042765f598f561682dd58aa4d">CRP_COL_STACK_MODULE_ROWID</a> </td><td>Row index of a module in <a class="el" href="_crash_rpt_probe_8h.html#f6846fd2538956b0f7fba6f1b2ce7d8f">CRP_TBL_MDMP_MODULES</a> table. Use this value to get module information for this stack frame. Convert this value to <code>int</code> and pass to <a class="el" href="group___crash_rpt_probe_a_p_i.html#g0e45570a3b25c6c5f8971b3179c5fdbf" title="Character set-independent mapping of crpGetPropertyW() and crpGetPropertyA() functions...">crpGetProperty()</a> function as row index.<p>
Possible values are integer numbers starting from zero, or -1 if there module can't be determined for this stack frame.<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#2f18d540568e12f72e3d41aaf38b4f95">CRP_COL_STACK_SYMBOL_NAME</a> </td><td>Symbol name for this stack frame. Symbol name may be the name of function or class method.<p>
This value may be empty, if the symbol name can't be determined for this stack frame.<p>
Example: "CBaseClass::SomeMethod", "memcpy"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#296fa91c1ec2d448c9477aa7ef9925d0">CRP_COL_STACK_OFFSET_IN_SYMBOL</a> </td><td>Offset in symbol, hexadecimal value.<p>
Example: "0x1f"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#c68dc4e998f6bbeaeed634b26cbbf078">CRP_COL_STACK_SOURCE_FILE</a> </td><td>Path to source file.<p>
Example: "D:\MyProject\src\memfuncs.cpp"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#77b12edf4bdd104905d0e3df0c711a06">CRP_COL_STACK_SOURCE_LINE</a> </td><td>Source file line number. Decimal.<p>
Example: "100"<p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#a27c745dc1550285f7f5d1e7a436e3ca">CRP_COL_STACK_ADDR_PC_OFFSET</a> </td><td>Program counter CPU register's value for this stack frame. Hexadecimal.<p>
Example: "0x800000435"<p>
</td></tr>
</table>
<h2><a class="anchor" name="list_of_column_ids_for_mdmploadlog">
The List of Column IDs of the CRP_MDMP_LOAD_LOG Table</a></h2>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>Column ID</b> </td><td><b>Description</b><p>
</td></tr>
<tr>
<td><a class="el" href="_crash_rpt_probe_8h.html#295ace266085a35e5b6ea68b81aeeed4">CRP_COL_LOAD_LOG_ENTRY</a> </td><td>A entry of the minidump loading log.<p>
This property may present in reports generated by <b>CrashRpt v1.2.8 and later</b><p>
Example values are implementation specific.<p>
</td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Oct 22 17:37:43 2011 for CrashRpt by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Russian Federation Russian Federation
I am a software developer currently living in Tomsk, Russia. I received a PhD degree in Computer Science from Tomsk Polytechnic University in 2010. I have been professionally developing C/C++ and PHP software since 2005. I like contributing to open-source and writing programming articles for popular web resources, like CodeProject. Besides writing, I love skiing and watching Formula-1.

Comments and Discussions