]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.databoard/cpp/DataBoardTest/DataBoardTest/Stackwalker.h
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.databoard / cpp / DataBoardTest / DataBoardTest / Stackwalker.h
1 /*////////////////////////////////////////////////////////////////////////////
2  *  Project:
3  *    Memory_and_Exception_Trace
4  *
5  * ///////////////////////////////////////////////////////////////////////////
6  *  File:
7  *    Stackwalker.h
8  *
9  *  Remarks:
10  *
11  *
12  *  Note:
13  *
14  *
15  *  Author:
16  *    Jochen Kalmbach
17  *
18  *////////////////////////////////////////////////////////////////////////////
19
20 #ifndef __STACKWALKER_H__
21 #define __STACKWALKER_H__
22
23 // Only valid in the following environment: Intel platform, MS VC++ 5/6/7/7.1/8
24 #ifndef _X86_
25 #error Only INTEL envirnoments are supported!
26 #endif
27
28 // Only MS VC++ 5 to 7
29 //#if (_MSC_VER < 1100) || (_MSC_VER > 1400)
30 //#error Only MS VC++ 5/6/7/7.1/8 supported. Check if the '_CrtMemBlockHeader' has not changed with this compiler!
31 //#endif
32
33 typedef enum eAllocCheckOutput
34 {
35   ACOutput_Simple,
36   ACOutput_Advanced,
37   ACOutput_XML
38 };
39
40 // Make extern "C", so it will also work with normal C-Programs
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 extern int InitAllocCheckWN(eAllocCheckOutput eOutput, LPCTSTR pszFilename, ULONG ulShowStackAtAlloc = 0);
45 extern int InitAllocCheck(eAllocCheckOutput eOutput = ACOutput_Simple, BOOL bSetUnhandledExeptionFilter = TRUE, ULONG ulShowStackAtAlloc = 0);  // will create the filename by itself
46
47 extern ULONG DeInitAllocCheck();
48
49 extern DWORD StackwalkFilter( EXCEPTION_POINTERS *ep, DWORD status, LPCTSTR pszLogFile);
50
51 extern void OnlyInstallUnhandeldExceptionFilter(eAllocCheckOutput eOutput = ACOutput_Simple);
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 #endif  // __STACKWALKER_H__