IEnumFilters::Next method (strmif.h)

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

Syntax

HRESULT Next(
  [in]  ULONG       cFilters,
  [out] IBaseFilter **ppFilter,
  [out] ULONG       *pcFetched
);

Parameters

[in] cFilters

Number of filters to retrieve.

[out] ppFilter

Array of size cFilters that is filled with IBaseFilter interface pointers. The caller must release the interfaces.

[out] pcFetched

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.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IEnumFilters Interface