The IFilterGraph::EnumFilters method returns the enumerator interface. It is based on the COM IEnum style of enumerators.
When to Implement
This interface is implemented on the filter graph manager and is not intended for implementation by developers.
When to Use
This interface is used by applications or other filters to determine what filters exist in the filter graph.
Methods in Vtable Order
| IUnknown methods | Description |
| QueryInterface | Returns pointers to supported interfaces. |
| AddRef | Increments the reference count. |
| Release | Decrements the reference count. |
| IEnumFilters methods | Description |
| Next | Retrieves the specified number of filters in the enumeration sequence. |
| Skip | Skips a specified number of filters in the enumeration sequence. |
| Reset | Resets the enumeration sequence to the beginning. |
| Clone | Retrieves a duplicate enumerator containing the same enumeration state as the current one. |
Retrieves a duplicate enumerator containing the same enumeration state as the current one.
HRESULT Clone(
IEnumFilters ** ppEnum
);
No return value.
This method produces two enumerators (the original and the duplicate); both are set at the same filter. After they are created, however, they are independent; therefore, calling the IEnumFilters::Next method for one does not affect the other.
Retrieves the specified number of filters in the enumeration sequence.
HRESULT Next(
ULONG cFilters,
IBaseFilter ** ppFilter,
ULONG * pcFetched
);
Returns an HRESULT value that depends on the implementation. HRESULT can be one of the following standard constants, or other values not listed:
| Value | Meaning |
| E_FAIL | Failure. |
| E_POINTER | Null pointer argument. |
| E_INVALIDARG | Invalid argument. |
| E_NOTIMPL | Method isn't supported. |
| S_OK or NOERROR | Success. |
The interface returned by this method has had its reference count incremented. Be sure to use IUnknown::Release on the interface to decrement the reference count when you have finished using the interface.
Resets the enumeration sequence to the beginning.
HRESULT Reset(void);
Returns an HRESULT value that depends on the implementation. HRESULT can be one of the following standard constants, or other values not listed:
| Value | Meaning |
| E_FAIL | Failure. |
| E_POINTER | Null pointer argument. |
| E_INVALIDARG | Invalid argument. |
| E_NOTIMPL | Method isn't supported. |
| S_OK or NOERROR | Success. |
This method affects the return value of the next call to the IEnumFilters::Next method.
Skips a specified number of filters in the enumeration sequence.
HRESULT Skip(
ULONG cFilter
);
No return value.
This method affects the return value of the next call to the IEnumFilters::Next method.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.