IDirect3D9::CheckDepthStencilMatch

This is a method of IDirect3D9. It determines whether a depth-stencil format is compatible with a render-target format in a particular display mode.

Syntax
HRESULT CheckDepthStencilMatch( UINT Adapter,  D3DDEVTYPE DeviceType,  D3DFORMAT AdapterFormat,  D3DFORMAT RenderTargetFormat,  D3DFORMAT DepthStencilFormat );

Parameters
 Adapter -  Ordinal number identifying the adapter to check. It will most likely be D3DADAPTER_DEFAULT.

 DeviceType -  Identifies the device type. A member of D3DDEVTYPE.

 AdapterFormat -  Identifies the adapter format. A member of D3DDEVTYPE.

 RenderTargetFormat -  Identifies the format of the render-target surface. A member of D3DDEVTYPE.

 DepthStencilFormat -  Identifies the format of the depth-stencil surface. A member of D3DDEVTYPE.

Return Values
If it succeeds, it will return D3D_OK. If one of the parameters is incorrect, it will return D3DERR_INVALIDCALL. If it is not compatible, it will return D3DERR_NOTAVAILABLE.

Requirements
 Header -  d3d9.h

 Library -  d3d9.lib