The IBaseFilter::EnumPins method returns this interface. It is based on the IEnumX protocol of the Component Object Model (COM).
Note that actions that cause the number of pins to change might cause the enumerator to fail.
When to Implement
This interface must be implemented and made available by the IBaseFilter::EnumPins method. The CBaseFilter::EnumPins member function automatically does this in the DirectShow class library and uses the CEnumPins class to create the enumerator object.
When to Use
This interface is normally used by the filter graph manager when connecting filters. It can, however, be used by an application that must find the pins associated with filters in the filter graphfor example, to add another filter to the graph.
Methods in Vtable Order
| IUnknown methods | Description |
| QueryInterface | Returns pointers to supported interfaces. |
| AddRef | Increments the reference count. |
| Release | Decrements the reference count. |
| IEnumPins methods | Description |
| Next | Puts pointers to IPin interfaces for the next pins into the specified array. |
| Skip | Skips the specified number of pins. |
| Reset | Resets the position to the beginning so that the next call to the IEnumPins::Next method returns, at a minimum, the first pin of the filter. |
| Clone | Provides another enumerator, which is a duplicate of the current one. |
Makes a copy of the enumerator. This allows the calling application to retain two positions in the list of pins.
HRESULT Clone(
IEnumPins ** ppEnum
);
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. |
Places pointers to IPin interfaces into the specified array.
HRESULT Next(
ULONG cPins,
IPin ** ppPins,
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 enumerator to the beginning so that the next call to the IEnumPins::Next method returns, at a minimum, the first pin of the filter.
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. |
Skips the specified number of pins.
HRESULT Skip(
ULONG cPins
);
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 next call to the IEnumPins::Next method.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.