DXTRACE_MSG
Microsoft DirectX 9.0 SDK Update (October 2004)

DXTRACE_MSG Macro


Output a debug message for a failed function call.

Syntax

HRESULT DXTRACE_MSG(


    CHAR *str );

Parameters

str
[in] Pointer to a user-supplied debug message that will be passed to the debugger.

Return Value

Returns zero if successful, or a nonzero value if not.



Remarks

For example, if you call DXTRACE_MSG with:

    DXTRACE_MSG( "Call failed" ) 

A function call that fails will output a debug message in the output window of the compiler similar to this one:

    c:\basichlsl\basichlsl.cpp(242): Call failed

This identifies the file and line number of the function call that fails. You must be running a debug build to see the message. 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 are interested in returning the error code also, see DXTRACE_ERR.

Macro Information

Headerdxerr9.h
Minimum operating systems Windows 98


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.