Microsoft DirectX 8.0 (C++) |
Returns the name associated with a Microsoft® DirectX error® code.
TCHAR* DXGetErrorString8( HRESULT hr );
If successful, this function returns a pointer to a string that contains the name of the error code. If Unicode is set, DXGetErrorString8 will return a Unicode string. Otherwise, it will return an ANSI string.
This function is designed to retrieve the text equivalent of a DirectX error message from a Microsoft Direct3D®, D3DX, DirectPlay®, DirectInput®, DirectMusic®, or DirectSound® method. For example, if you set hr to 0x88768686, DXGetErrorString8 will return D3DERR_DEVICELOST.
If an error code maps to more than one text string, DXGetErrorString8 will return a generic string. For example, there are several DirectX error codes, such as DIERR_OUTOFMEMORY, that indicate that you are out of memory, and all map to the same value. If you set hr to any of these codes, DXGetErrorString8 will return E_OUTOFMEMORY.
Windows NT/2000: Requires Windows® 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Version: Requires DirectX 8.0.
Header: Declared in Dxerr8.h.
Import Library: Use Dxerr8.lib