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