Microsoft DirectX 8.1 (C++)

IEnumFilters::Next

The Next method retrieves the specified number of filters in the enumeration sequence.

Syntax

HRESULT Next(
  ULONG cFilters,
  IBaseFilter **ppFilter,
  ULONG *pcFetched
);

Parameters

cFilters

[in] Number of filters to retrieve.

ppFilter

[out] Array of size cFilters that is filled with IBaseFilter interface pointers.

pcFetched

[out] Pointer to a variable that receives the number of filters retrieved. Can be NULL if cFilters is 1.

Return Value

Value Description
S_FALSE Did not retrieve as many filters as requested.
S_OK Success.
E_INVALIDARG Invalid argument.
E_POINTER Null pointer argument.
VFW_E_ENUM_OUT_OF_SYNC The graph has changed and is now inconsistent with the enumerator.

Remarks

If the method succeeds, the IBaseFilter pointers all have outstanding reference counts. Be sure to release them when you are done.

If the filter graph changes (for example, the application removes a filter), the enumerator is no longer be consistent with the graph, and the method returns VFW_E_ENUM_OUT_OF_SYNC. Discard any data obtained from previous calls to the enumerator, because it might be invalid. Update the enumerator by calling the IEnumFilters::Reset method. You can then call the Next method safely.

See Also