OSDN Git Service

WebGUIのレスポンスが悪かったのを修正
[peercast-im/PeerCastIM.git] / core / win32 / seh.h
1 #ifndef _SEH_H_
2 #define _SEH_H_
3
4 #include "stream.h"
5 #include <dbghelp.h>
6
7 #pragma once
8 #pragma comment(lib, "dbghelp.lib")
9
10 extern FileStream fs;
11
12 #ifndef _DEBUG
13 #define SEH_THREAD(func, name) \
14 { \
15         __try \
16         { \
17                 return func(thread); \
18         } __except(SEHdump(GetExceptionInformation()), EXCEPTION_EXECUTE_HANDLER) \
19         { \
20         } \
21 }
22
23 #else
24
25 #define SEH_THREAD(func, name) return func(thread);
26 #endif
27
28 void SEHdump(_EXCEPTION_POINTERS *);
29
30 #endif