Microsoft DirectX 9.0

IAMStats::GetIndex

The GetIndex method retrieves the index for a named statistic, or creates a new statistic.

Syntax

HRESULT GetIndex(
  BSTR szName
  long lCreate
  long plIndex
);

Parameters

szName

[in] Specifies the name of the statistic.

lCreate

[in] Specifies whether to create the statistic, if it is not defined already. If the value is TRUE, the method creates a new index for the statistic when it cannot find an existing entry with that name. If the value is FALSE, the method fails when the statistic does not already exist.

plIndex

[out] Pointer to a variable that receives the index.

Return Values

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK Success.
HRESULT_FROM_WIN32(ERROR_NOT_FOUND) No match for this name.
E_POINTER NULL pointer argument.

See Also