1
|
1 /***********************************************************************\
|
|
2 * dxerr8.d *
|
|
3 * *
|
|
4 * Windows API header module *
|
|
5 * *
|
|
6 * Translated from MinGW Windows headers *
|
|
7 * *
|
|
8 * Placed into public domain *
|
|
9 \***********************************************************************/
|
|
10 module win32.directx.dxerr8;
|
|
11
|
|
12 /*
|
|
13 dxerr8.d - Header file for the DirectX 8 Error API
|
|
14
|
|
15 Written by Filip Navara <xnavara@volny.cz>
|
|
16 Ported to D by James Pelcis <jpelcis@gmail.com>
|
|
17
|
|
18 This library is distributed in the hope that it will be useful,
|
|
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
21 */
|
|
22
|
|
23 private import win32.windef;
|
|
24
|
|
25 extern (Windows) {
|
|
26 char* DXGetErrorString8A (HRESULT);
|
|
27 WCHAR* DXGetErrorString8W (HRESULT);
|
|
28 char* DXGetErrorDescription8A (HRESULT);
|
|
29 WCHAR* DXGetErrorDescription8W (HRESULT);
|
|
30 HRESULT DXTraceA (char*, DWORD, HRESULT, char*, BOOL);
|
|
31 HRESULT DXTraceW (char*, DWORD, HRESULT, WCHAR*, BOOL);
|
|
32 }
|
|
33
|
|
34 version (Unicode) {
|
|
35 alias DXGetErrorString8W DXGetErrorString8;
|
|
36 alias DXGetErrorDescription8W DXGetErrorDescription8;
|
|
37 alias DXTraceW DXTrace;
|
|
38 } else {
|
|
39 alias DXGetErrorString8A DXGetErrorString8;
|
|
40 alias DXGetErrorDescription8A DXGetErrorDescription8;
|
|
41 alias DXTraceA DXTrace;
|
|
42 }
|
|
43
|
|
44 debug (dxerr) {
|
|
45 HRESULT DXTRACE_MSG(TCHAR* str) {
|
|
46 return DXTrace(__FILE__, __LINE__, 0, str, FALSE);
|
|
47 }
|
|
48
|
|
49 HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) {
|
|
50 return DXTrace(__FILE__, __LINE__, hr, str, TRUE);
|
|
51 }
|
|
52
|
|
53 HRESULT DXTRACE_ERR_NOMSGBOX (WCHAR* str, HRESULT hr) {
|
|
54 return DXTrace(__FILE__, __LINE__, hr, str, FALSE);
|
|
55 }
|
|
56 } else {
|
|
57 HRESULT DXTRACE_MSG(TCHAR* str) {
|
|
58 return 0;
|
|
59 }
|
|
60
|
|
61 HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) {
|
|
62 return hr;
|
|
63 }
|
|
64
|
|
65 HRESULT DXTRACE_ERR_NOMSGBOX(TCHAR* str, HRESULT hr) {
|
|
66 return hr;
|
|
67 }
|
|
68 }
|