IAMStats::GetIndex method (control.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The GetIndex
method retrieves the index for a named statistic, or creates a new statistic.
Syntax
HRESULT GetIndex(
[in] BSTR szName,
[in] long lCreate,
[out] long *plIndex
);
Parameters
[in] szName
Specifies the name of the statistic.
[in] lCreate
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.
[out] plIndex
Receives the index.
Return value
Returns an HRESULT value. Possible values include the following.
Return code | Description |
---|---|
|
Success. |
|
No match for this name. |
|
NULL pointer argument. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | control.h (include Dshow.h) |
Library | Strmiids.lib |