Microsoft DirectX 8.1 (C++)

DXTrace

Displays a message box, and passes the error code to DXGetErrorString8.

HRESULT DXTrace(
  char *strFile,
  DWORD dwLine,
  HRESULT hr,
  TCHAR *strMsg,
  BOOL bPopMsgBox
);

Parameters

strFile
[in] Pointer to the name of the current file. You can set this parameter easily with the __FILE__ macro.
dwLine
[in] Line number. You can set this parameter easily with the __LINE__ macro.
hr
[in] HRESULT containing an error code. This value will be passed to DXGetErrorString8 and converted to the equivalent name.
strMsg
[in] Pointer to an optional message that will be displayed along with the file name, line number, and HRESULT.
bPopMsgBox
[in] Specifies whether a message box should be displayed. If bPopMsgBox is set to TRUE and hr is non-zero, a message box will be displayed containing the values of the first four parameters. If bPopMsgBox is set to FALSE, the information is passed to the debugger.

Return Values

Returns the HRESULT that was assigned to hr.

Requirements

  Windows NT/2000/XP: Requires Windows® 2000.
  Windows 98/Me: Requires Windows 98 or later. Available as a redistributable for Windows 98.
  Version: Requires DirectX® 8.1.
  Header: Declared in Dxerr8.h.
  Import Library: Use Dxerr8.lib