1 /*==========================================================================;
5 * Content: DirectX Error Library Include File
7 ****************************************************************************/
10 #define _GLD_DXERR7_H_
18 // Desc: Converts an DirectX HRESULT to a string
20 // Args: HRESULT hr Can be any error code from
21 // DPLAY D3D8 D3DX8 DMUSIC DSOUND
23 // Return: Converted string
25 const char* __stdcall
DXGetErrorString8A(HRESULT hr
);
26 const WCHAR
* __stdcall
DXGetErrorString8W(HRESULT hr
);
29 #define DXGetErrorString8 DXGetErrorString8W
31 #define DXGetErrorString8 DXGetErrorString8A
38 // Desc: Outputs a formatted error message to the debug stream
40 // Args: CHAR* strFile The current file, typically passed in using the
42 // DWORD dwLine The current line number, typically passed in using the
44 // HRESULT hr An HRESULT that will be traced to the debug stream.
45 // CHAR* strMsg A string that will be traced to the debug stream (may be NULL)
46 // BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info.
48 // Return: The hr that was passed in.
50 //HRESULT __stdcall DXTraceA( char* strFile, DWORD dwLine, HRESULT hr, char* strMsg, BOOL bPopMsgBox = FALSE );
51 //HRESULT __stdcall DXTraceW( char* strFile, DWORD dwLine, HRESULT hr, WCHAR* strMsg, BOOL bPopMsgBox = FALSE );
52 HRESULT __stdcall
DXTraceA( char* strFile
, DWORD dwLine
, HRESULT hr
, char* strMsg
, BOOL bPopMsgBox
);
53 HRESULT __stdcall
DXTraceW( char* strFile
, DWORD dwLine
, HRESULT hr
, WCHAR
* strMsg
, BOOL bPopMsgBox
);
56 #define DXTrace DXTraceW
58 #define DXTrace DXTraceA
65 #if defined(DEBUG) | defined(_DEBUG)
66 #define DXTRACE_MSG(str) DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE )
67 #define DXTRACE_ERR(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE )
68 #define DXTRACE_ERR_NOMSGBOX(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE )
70 #define DXTRACE_MSG(str) (0L)
71 #define DXTRACE_ERR(str,hr) (hr)
72 #define DXTRACE_ERR_NOMSGBOX(str,hr) (hr)