OSDN Git Service

e22e8c1a3a96690585a35220dd3dbd4b09eb6a08
[mingw/mingw-org-wsl.git] / w32api / include / directx / dxerr8.h
1 /*
2
3         dxerr8.h - Header file for the DirectX 8 Error API
4
5         Written by Filip Navara <xnavara@volny.cz>
6
7         This library is distributed in the hope that it will be useful,
8         but WITHOUT ANY WARRANTY; without even the implied warranty of
9         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
11 */
12
13 #ifndef _DXERR8_H
14 #define _DXERR8_H
15 #if __GNUC__ >=3
16 #pragma GCC system_header
17 #endif
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 const char *WINAPI DXGetErrorString8A(HRESULT);
24 const WCHAR *WINAPI DXGetErrorString8W(HRESULT);
25 const char* WINAPI DXGetErrorDescription8A(HRESULT);
26 const WCHAR* WINAPI DXGetErrorDescription8W(HRESULT);
27 HRESULT WINAPI DXTraceA(const char*,DWORD,HRESULT,const char*,BOOL);
28 HRESULT WINAPI DXTraceW(const char*,DWORD,HRESULT,const WCHAR*,BOOL);
29
30 #ifdef UNICODE
31 #define DXGetErrorString8 DXGetErrorString8W
32 #define DXGetErrorDescription8 DXGetErrorDescription8W
33 #define DXTrace DXTraceW
34 #else
35 #define DXGetErrorString8 DXGetErrorString8A
36 #define DXGetErrorDescription8 DXGetErrorDescription8A
37 #define DXTrace DXTraceA
38 #endif
39
40 #if defined(DEBUG) || defined(_DEBUG)
41 #define DXTRACE_MSG(str)        DXTrace(__FILE__,(DWORD)__LINE__,0,str,FALSE)
42 #define DXTRACE_ERR(str,hr)     DXTrace(__FILE__,(DWORD)__LINE__,hr,str,TRUE)
43 #define DXTRACE_ERR_NOMSGBOX(str,hr)    DXTrace(__FILE__,(DWORD)__LINE__,hr,str,FALSE)
44 #else
45 #define DXTRACE_MSG(str)        (0L)
46 #define DXTRACE_ERR(str,hr)     (hr)
47 #define DXTRACE_ERR_NOMSGBOX(str,hr)    (hr)
48 #endif
49
50 #ifdef __cplusplus
51 }
52 #endif
53 #endif