Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cNTMiniDump.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cNTMiniDump_H
7 #define _INC_cNTMiniDump_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "../GrayLibBase.h"
13 
14 #if defined(_WIN32) && ! defined(UNDER_CE)
18 typedef struct _EXCEPTION_POINTERS EXCEPTION_POINTERS;
19 
20 namespace GrayLib
21 {
22  UNITTEST2_PREDEF(cNTMiniDump);
23 
24  class GRAYLIB_LINK cNTMiniDump : public cSingleton < cNTMiniDump >
25  {
29 
30  friend class cSingleton < cNTMiniDump > ;
32 
33  protected:
34  static LONG WINAPI UnhandledExceptionFilter(EXCEPTION_POINTERS* pExceptionInfo);
35  static cStringF sm_sDumpFilePath;
36 
37  protected:
38  cNTMiniDump() : cSingleton<cNTMiniDump>(this, typeid(cNTMiniDump))
39  {
40  }
41  ~cNTMiniDump()
42  {
43  }
44 
45  public:
46  static void* GRAYCALL InstallExceptionFilter(); // Connect the exception filter. FARPROC
47  static void GRAYCALL SetDumpFilePath(cStringF sDumpFilePath);
48  static StrLen_t GRAYCALL GetDefaultDumpFilePath(FILECHAR_t* pszFilePath, StrLen_t nFileLenMax);
49  static HRESULT GRAYCALL CreateExceptionDumpFile(const FILECHAR_t* pszFilePath, EXCEPTION_POINTERS* pExceptionInfo = nullptr);
50 
51  UNITTEST2_PREDEF(cNTMiniDump);
52  };
53 };
54 #endif // _WIN32
55 #endif // _INC_cNTMiniDump_H
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define CHEAPOBJECT_IMPL
Definition: cHeapObject.h:32
Definition: cMesh.h:22
UNITTEST2_PREDEF(cQuadtree)
int StrLen_t
the length of a string in chars (bytes for UTF8, wchar_t for UNICODE). or offset in characters....
Definition: StrConst.h:32
cStringT< FILECHAR_t > cStringF
A file name. checks USE_UNICODE_FN. related to cFilePath.
Definition: cFilePath.h:17
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22