Microsoft DirectX 8.1 (C++)

D3DXGetErrorString

Returns the error string for an HRESULT.

HRESULT D3DXGetErrorString(
  HRESULT hr,
  LPCTSTR pBuffer,
  UINT    BufferLen
);

Parameters

hr
[in] The specified HRESULT error code to decipher.
pBuffer
[out] Pointer to the buffer to fill with the error string.
BufferLen
[in] Number of characters in the buffer. Any error message longer than this length will be truncated.

Return Values

If the function succeeds, the return value is D3D_OK.

If the function fails, the return value is D3DERR_INVALIDCALL.

Remarks

This function Interprets all Microsoft® Direct3D® and Direct3DX HRESULTS. It is recommended that you use the method DXGetErrorString8, which handles all DirectX components including: Direct3D, Microsoft DirectInput®, Microsoft DirectSound®, Microsoft DirectMusic®, Microsoft DirectShow®, Microsoft DirectPlay®, and standard Microsoft Win32® errors.

This function supports both Unicode and ANSI strings.

Requirements

  Header: Declared in D3dx8core.h.
  Import Library: Use D3dx8.lib.

See Also

DXGetErrorString8