Links
dtSearch Text Retrieval Engine Programmer's Reference
dtsCrashHandlerInfo Structure
Structs, Records, Enums | Send Feedback

Used to install a crash handler so a stack trace can be recorded in the event of an unhandled exception

struct dtsCrashHandlerInfo {
  void * pData;
  void (* pNotifyFn)(void *pData, const char *logName);
  char appName[40];
  char appVersion[40];
  char logName[256];
  const char * logName2;
  const char * miniDumpName;
};
File

dtsearch.h

Members
Members 
Description 
void * pData; 
An optional value to be passed to the pNotifyFn. 
void (* pNotifyFn)(void *pData, const char *logName); 
An optional callback function to be called when a crash occurs. 
char appName[40]; 
Information identifying the application, which will be written in the header of the log file. 
char appVersion[40]; 
Information identifying the application, which will be written in the header of the log file. 
char logName[256]; 
Deprecated: Use logName2 
const char * logName2; 
The name of the log file to create with the stack trace. 
const char * miniDumpName; 
Name of Windows MiniDump file to create 
Remarks

The functions to install and remove the crash handler are: void dtssInstallCrashDiagnostics(dtsCrashHandlerInfo& info) void dtssRemoveCrashDiagnostics() 

The stack trace file will list each item on the stack as an address. A utility included with the dtSearch Engine, StackTrace.exe, can be used to convert these addresses to symbol names. To use StackTrace.exe, you will need a .map file for your program. For example, if your program is MySearch.exe, you will need a map file named MySearch.map. The Visual C++ linker does not generate map files by default so you will need to enable this option to get a map file. Also, the map file is only valid for the particular build for which it was generated. If you modify and rebuild the program, a new map file will be needed. Once you have a map file and the text file created by dtssInstallCrashDiagnostics, you can get the symbols as follows:

    StackTrace MySearch.map Error.txt > ErrorWithSymbols.txt

If your program includes multiple modules, you can list the map files for each module before the error file, like this:

    StackTrace MySearch.map MyAdditionalDll.map Error.txt > ErrorWithSymbols.txt
Group
Links
You are here: C++ API > Structs, Records, Enums > dtsCrashHandlerInfo Structure
Copyright (c) 1995-2008 dtSearch Corp. All rights reserved.