Share via


IAMStats::GetIndex

 
Microsoft DirectShow 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] 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.

Requirements

Header: Declared in Control.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also