Advertisement

dxerr.h documentation

Started by July 19, 2017 06:31 AM
2 comments, last by MarcusAseth 7 years, 4 months ago

This header is mentioned in the book I'm reading but there is no documentation on msdn... Is it like an... outdated and abandoned header?

If so, what's the current default/recomended library for handling errors with directX? :S

Handle errors how?

D3D reports almost all failures using HRESULTs, you don't need dxerr.h's functions to interpret and handle those failures. For the most part the SUCCEEDED() and FAILED() macros will let you make the appropriate determination, and they will be pulled in by simply including Windows.h.

The dxerr library is basically dead. All it was useful for, really, was getting formatted error strings from some HRESULTs, and some utility macros. If you really need that functionality you can find various reimplementations (for example, header and source). In practice I've found it more useful to simply write code that interprets the actual HRESULT in the context of the actual failure and propagate a custom error message to users that way, rather than the generic context-free messages produced by the old dxerr functions. You can also use FormatMessage directly.

Advertisement

got it, thanks :)

This topic is closed to new replies.

Advertisement