-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCrashDump.h
43 lines (38 loc) · 1.4 KB
/
CrashDump.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2012 hcfr Project. All rights reserved.
/////////////////////////////////////////////////////////////////////////////
//
// This file is subject to the terms of the GNU General Public License as
// published by the Free Software Foundation. A copy of this license is
// included with this software distribution in the file COPYING.htm. If you
// do not have a copy, you may obtain a copy by writing to the Free
// Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
//
// This software is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details
/////////////////////////////////////////////////////////////////////////////
// Author(s):
// John Adcock
/////////////////////////////////////////////////////////////////////////////
#if !defined(CRASHDUMP_INCLUDED)
#define CRASHDUMP_INCLUDED
#pragma once
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif
/// CrashDump
/// Create and instance of this object to enable crash dumps on the current thread
class CrashDump
{
public:
CrashDump();
~CrashDump();
private:
HINSTANCE m_DbgHelpInstance;
_se_translator_function m_OldTranslator;
};
#endif