ID3DXConstantTable::GetConstantDesc method

Gets a pointer to an array of constant descriptions in the constant table.

Syntax

HRESULT GetConstantDesc(
  [in]      D3DXHANDLE        hConstant,
  [in, out] D3DXCONSTANT_DESC *pDesc,
  [in, out] UINT              *pCount
);

Parameters

hConstant [in]

Type: D3DXHANDLE

Unique identifier to a constant. See D3DXHANDLE.

pDesc [in, out]

Type: D3DXCONSTANT_DESC*

Returns a pointer to an array of descriptions. See D3DXCONSTANT_DESC.

pCount [in, out]

Type: UINT*

The input supplied must be the maximum size of the array. The output is the number of elements that are filled in the array when the function returns.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

Remarks

ID3DXConstantTable::GetConstantDesc will sometimes return a D3DXCONSTANT_DESC with a Register_Count of 0. This will happen with a constant appears in more than one Register_Set but does not have space in that register set allocated.

Because a sampler can appear more than once in a constant table, this method can return an array of descriptions, each one with a different register index.

Requirements

Requirement Value
Header
D3DX9Shader.h
Library
D3dx9.lib

See also

ID3DXConstantTable

ID3DXConstantTable::GetDesc