Platform SDK: DirectX

D3DXGetDeviceCaps

The D3DXGetDeviceCaps function lists all the capabilities of a device at a display mode.

HRESULT D3DXGetDeviceCaps(
  DWORD deviceIndex,
  D3DX_VIDMODEDESC* pVidMode,
  D3DDEVICEDESC7* pD3DCaps,
  DDCAPS* pDDHALCaps,
  DDCAPS* pDDHELCaps
); 

Parameters

deviceIndex
An index value specifying the device. Using D3DX_DEFAULT for this parameter specifies the device with the highest acceleration level afforded on the primary surface.
pVidMode
A pointer to a D3DX_VIDMODEDESC structure describing the display mode. If this parameter is NULL, Direct3DX will return the capabilities for the current display mode of the device.
pD3DCaps
A pointer to a D3DDEVICEDESC7 structure, describing the Direct3D capabilities of the chosen device. Specify NULL to ignore this parameter.
pDDHALCaps
A pointer to a DDCAPS structure, describing the DirectDraw hardware abstraction layer (HAL) capabilities. Specify NULL to ignore this parameter.
pDDHELCaps
A pointer to a DDCAPS structure, describing the DirectDraw hardware emulation layer (HEL) capabilities. Specify NULL to ignore this parameter

Return Values

If the function succeeds, the return value is S_OK.

If the function fails, the return value may be one of the following values:

D3DXERR_CAPSNOTSUPPORTED
D3DXERR_D3DXNOTSTARTEDYET
D3DXERR_FAILEDGETCAPS
D3DXERR_INITFAILED
D3DXERR_INVALIDD3DXDEVICEINDEX

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.

See Also

D3DXGetDeviceCount, D3DXGetDeviceDescription