![]() |
![]() |
![]() |
Displays a message box with error information.
Syntax
HRESULT DXTRACE_ERR_MSGBOX(
char *str, HRESULT hr );
Parameters
- str
- [in] Pointer to a string to be displayed in the message box.
- hr
- [in] HRESULT containing an error code. This value will be passed to DXGetErrorString9 and converted to the equivalent name.
Return Value
Returns the HRESULT that was assigned to hr.
Remarks
For debug builds, the macro will display an error message that looks similar to the following:
c:\basichlsl\basichlsl.cpp(242): D3DXCreateFont( pd3dDevice, 15, 0, FW_BOLD, 1, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, L"Arial", NULL ) hr=D3DERR_INVALIDCALL (0x8876086c)If you are using the Microsoft Visual Studio .NET debugger, you can jump to the line of source code where the error occurred by double-clicking this message in the debug output window.
If you don't want to use a message box to debug, you can send error messages to the debug output window in Visual Studio .NET using DXTRACE_ERR or DXTRACE_MSG.
Macro Information
Header dxerr9.h Minimum operating systems Windows 98