annotate win32/directx/dxerr.d @ 5:496dfd8f7342 default tip

added: -repeat option for "in", "ov" -run until a line option -run until a function option -break on a function start -n is an alias for ov
author marton@basel.hu
date Sun, 17 Apr 2011 11:05:31 +0200
parents 4a9dcbd9e54f
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 * dxerr.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 * Placed into public domain *
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 module win32.directx.dxerr;
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 import win32.windows;
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 pragma(lib, "dxerr.lib");
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
13
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
14 extern (Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
15 CHAR* DXGetErrorStringA(HRESULT hr);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
16 WCHAR* DXGetErrorStringW(HRESULT hr);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
17 CHAR* DXGetErrorDescriptionA(HRESULT hr);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
18 WCHAR* DXGetErrorDescriptionW(HRESULT hr);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
19 HRESULT DXTraceA(CHAR* strFile, DWORD dwLine, HRESULT hr, CHAR* strMsg,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
20 BOOL bPopMsgBox);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
21 HRESULT DXTraceW(CHAR* strFile, DWORD dwLine, HRESULT hr, WCHAR* strMsg,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
22 BOOL bPopMsgBox);
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
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25 version (Unicode) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26 alias DXGetErrorStringW DXGetErrorString;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27 alias DXGetErrorDescriptionW DXGetErrorDescription;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 alias DXTraceW DXTrace;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29 } else {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 alias DXGetErrorStringA DXGetErrorString;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 alias DXGetErrorDescriptionA DXGetErrorDescription;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32 alias DXTraceA DXTrace;
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 debug (dxerr) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36 HRESULT DXTRACE_MSG(TCHAR* str) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37 return DXTrace(__FILE__, __LINE__, 0, str, false);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40 return DXTrace(__FILE__, __LINE__, hr, str, false);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42 HRESULT DXTRACE_ERR_MSGBOX(TCHAR* str, HRESULT hr) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
43 return DXTrace(__FILE__, __LINE__, hr, str, true);
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 } else {
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 0;
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 hr;
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 HRESULT DXTRACE_ERR_MSGBOX(TCHAR* str, HRESULT hr) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
53 return hr;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55 }