comparison win32/directx/dxerr9.d @ 1:4a9dcbd9e54f

-files of 0.13 beta -fixes so that it now compiles with the current dmd version
author marton@basel.hu
date Tue, 05 Apr 2011 20:44:01 +0200
parents
children
comparison
equal deleted inserted replaced
0:586e4a649642 1:4a9dcbd9e54f
1 /***********************************************************************\
2 * dxerr9.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.dxerr9;
11
12 /*
13 dxerr9.h - Header file for the DirectX 9 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
24 private import win32.windef;
25
26 extern (Windows) {
27 char* DXGetErrorString9A(HRESULT);
28 WCHAR* DXGetErrorString9W(HRESULT);
29 char* DXGetErrorDescription9A(HRESULT);
30 WCHAR* DXGetErrorDescription9W(HRESULT);
31 HRESULT DXTraceA(char*, DWORD, HRESULT, char*, BOOL);
32 HRESULT DXTraceW(char*, DWORD, HRESULT, WCHAR*, BOOL);
33 }
34
35 version (Unicode) {
36 alias DXGetErrorString9W DXGetErrorString9;
37 alias DXGetErrorDescription9W DXGetErrorDescription9;
38 alias DXTraceW DXTrace;
39 } else {
40 alias DXGetErrorString9A DXGetErrorString9;
41 alias DXGetErrorDescription9A DXGetErrorDescription9;
42 alias DXTraceA DXTrace;
43 }
44
45 debug (dxerr) {
46 HRESULT DXTRACE_MSG(TCHAR* str) {
47 return DXTrace(__FILE__, cast(DWORD)__LINE__, 0, str, FALSE);
48 }
49
50 HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) {
51 return DXTrace(__FILE__, cast(DWORD)__LINE__, hr, str, FALSE);
52 }
53
54 HRESULT DXTRACE_ERR_NOMSGBOX(TCHAR* str, HRESULT hr) {
55 return DXTrace(__FILE__, cast(DWORD)__LINE__, hr, str, TRUE);
56 }
57 } else {
58 HRESULT DXTRACE_MSG(TCHAR* str) {
59 return 0;
60 }
61
62 HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) {
63 return hr;
64 }
65
66 HRESULT DXTRACE_ERR_NOMSGBOX(TCHAR* str, HRESULT hr) {
67 return hr;
68 }
69 }