[DDK]
[reactos.git] / include / dxsdk / dxerr8.h
1
2
3 #ifndef _DXERR8_H_
4 #define _DXERR8_H_
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10 const char* WINAPI DXGetErrorString8A(HRESULT hr);
11 const char* WINAPI DXGetErrorDescription8A(HRESULT hr);
12 HRESULT WINAPI DXTraceA( const char* strFile, DWORD dwLine, HRESULT hr, const char* strMsg, BOOL bPopMsgBox );
13
14 const WCHAR* WINAPI DXGetErrorString8W(HRESULT hr);
15 const WCHAR* WINAPI DXGetErrorDescription8W(HRESULT hr);
16 HRESULT WINAPI DXTraceW( const char* strFile, DWORD dwLine, HRESULT hr, const WCHAR* strMsg, BOOL bPopMsgBox );
17
18
19 #ifdef UNICODE
20 #define DXGetErrorString8 DXGetErrorString8W
21 #define DXGetErrorDescription8 DXGetErrorDescription8W
22 #define DXTrace DXTraceW
23 #else
24 #define DXGetErrorString8 DXGetErrorString8A
25 #define DXGetErrorDescription8 DXGetErrorDescription8A
26 #define DXTrace DXTraceA
27 #endif
28
29 #if defined(DEBUG) | defined(_DEBUG)
30 #define DXTRACE_MSG(str) DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE )
31 #define DXTRACE_ERR(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE )
32 #define DXTRACE_ERR_NOMSGBOX(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE )
33 #else
34 #define DXTRACE_MSG(str) (0L)
35 #define DXTRACE_ERR(str,hr) (hr)
36 #define DXTRACE_ERR_NOMSGBOX(str,hr) (hr)
37 #endif
38
39
40 #ifdef __cplusplus
41 }
42 #endif
43
44 #endif
45