Platform SDK: DirectX

D3DXGetErrorString

The D3DXGetErrorString function prints out an error string given an HRESULT.

void D3DXGetErrorString(
  HRESULT hr,
  DWORD strLength,
  LPSTR pStr
); 

Parameters

hr
The HRESULT error code to be deciphered.
strLength
The length of the string passed in.
pStr
The string output. Note that a string of appropriate size, specified in the strLength parameter, needs to be passed in.

Return Values

None.

Remarks

The D3DXGetErrorString function prints Win32, DirectX 6.0, and Direct3DX error messages.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Version: Requires DirectX 7.0.
  Header: Declared in d3dxcore.h.
  Library: Use d3dx.lib.