PFND3DDDI_GETCAPS callback function

The GetCaps function queries for capabilities of the graphics adapter.

Syntax

PFND3DDDI_GETCAPS Pfnd3dddiGetcaps;

HRESULT Pfnd3dddiGetcaps(
  HANDLE hAdapter,
  const D3DDDIARG_GETCAPS *Arg2
)
{...}

Parameters

hAdapter

A handle that identifies the graphics adapter.

Arg2

pData [in, out]

A pointer to a D3DDDIARG_GETCAPS structure that describes the capabilities to retrieve.

Return Value

GetCaps returns one of the following values:

Return code Description
S_OK The capabilities were successfully retrieved.
E_OUTOFMEMORY GetCaps could not allocate the required memory for it to complete.

Remarks

The data that is returned by the GetCaps function in the pData member of the D3DDDIARG_GETCAPS structure depends on the type of data that is requested (that is, the data depends on the Type member of D3DDDIARG_GETCAPS and sometimes on the pInfo member).

Here are examples of how to set up the GetCaps call depending on the value of D3DDDIARG_GETCAPS.Type.

D3DDDIARG_GETCAPS member Member value—Example 1 Member value—Example 2
Type D3DDDICAPS_DDRAW D3DDDICAPS_GETFORMATCOUNT
pInfo [in] NULL (no conditions are set) [in] NULL (no conditions are set)
pData [out] DDRAW_CAPS*(unique pointer) [out] UINT* (unique pointer)
DataSize sizeof(DDRAW_CAPS) sizeof(UINT)
Notes Driver must fill in the DDRAW_CAPS structure pointed to by pDatawith Microsoft DirectDraw capabilities that it supports. Driver must fill the buffer pointed to by pData with a UINT value that represents the number of D3DDDIFORMAT surface formats that the device supports.

See the D3DDDIARG_GETCAPS enumeration topic for explanations of other values for D3DDDIARG_GETCAPS.Type that are used for multiplane overlays.

Simple instancing

If a Microsoft Direct3D Level 9 driver that supports Windows Display Driver Model (WDDM) 1.3 and later completes a call to GetCaps and returns S_OK but doesn't change the data in the D3DDDIARG_GETCAPS structure, it indicates to the Direct3D runtime that the hardware and driver don't support simple instancing. For more info, see D3DDDICAPS_SIMPLE_INSTANCING_SUPPORT.

Requirements

   
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3dumddi.h (include D3dumddi.h)

See Also

D3DDDIARG_GETCAPS

D3DDDICAPS_SIMPLE_INSTANCING_SUPPORT

D3DDDIFORMAT

D3DDDI_ADAPTERFUNCS

DDRAW_CAPS