annotate win32/directx/dxerr8.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 * dxerr8.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.dxerr8;
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 dxerr8.d - Header file for the DirectX 8 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 private import win32.windef;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
24
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25 extern (Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26 char* DXGetErrorString8A (HRESULT);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27 WCHAR* DXGetErrorString8W (HRESULT);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 char* DXGetErrorDescription8A (HRESULT);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29 WCHAR* DXGetErrorDescription8W (HRESULT);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 HRESULT DXTraceA (char*, DWORD, HRESULT, char*, BOOL);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 HRESULT DXTraceW (char*, DWORD, HRESULT, WCHAR*, BOOL);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32 }
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 version (Unicode) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
35 alias DXGetErrorString8W DXGetErrorString8;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36 alias DXGetErrorDescription8W DXGetErrorDescription8;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37 alias DXTraceW DXTrace;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38 } else {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 alias DXGetErrorString8A DXGetErrorString8;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40 alias DXGetErrorDescription8A DXGetErrorDescription8;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41 alias DXTraceA DXTrace;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42 }
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 debug (dxerr) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
45 HRESULT DXTRACE_MSG(TCHAR* str) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
46 return DXTrace(__FILE__, __LINE__, 0, str, FALSE);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
47 }
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 HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
50 return DXTrace(__FILE__, __LINE__, hr, str, TRUE);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
51 }
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 HRESULT DXTRACE_ERR_NOMSGBOX (WCHAR* str, HRESULT hr) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54 return DXTrace(__FILE__, __LINE__, hr, str, FALSE);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
56 } else {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
57 HRESULT DXTRACE_MSG(TCHAR* str) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
58 return 0;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
59 }
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 HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
62 return hr;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
63 }
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 HRESULT DXTRACE_ERR_NOMSGBOX(TCHAR* str, HRESULT hr) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
66 return hr;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
67 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
68 }