Microsoft DirectX 8.0 |
Enumerates pins on a filter.
The IBaseFilter::EnumPins method returns this interface. It is based on the standard Component Object Model (COM) enumerators. For more information, see the IEnumXXXX topic in the Platform SDK.
The filter graph manager uses this interface when it connects filters. Applications can use it to retrieve pins on a filter. For more information, see Enumerating Objects in a Filter Graph.
If the number of pins on the filter changes, some methods on this interface return VFW_E_ENUM_OUT_OF_SYNC. Call the Reset method to resynchronize the enumerator.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IEnumPins methods Description Next Retrieves a specified number of pins. Skip Skips over a specified number of pins. Reset Resets the enumeration sequence to the beginning. Clone Makes a copy of the enumerator with the same enumeration state.
Makes a copy of the enumerator with the same enumeration state.
Syntax
HRESULT Clone( IEnumPins **ppEnum );
Parameters
- ppEnum
- [out] Address of a variable that receives a pointer to the IEnumPins interface of the new enumerator.
Return Value
Returns one of the following HRESULT values.
S_OK Success. E_OUTOFMEMORY Insufficient memory. E_POINTER NULL pointer argument. VFW_E_ENUM_OUT_OF_SYNC The filter's state has changed and is now inconsistent with the enumerator.
Remarks
If the number of pins changes, the enumerator is no longer consistent with the filter, 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 Reset method. You can then call the Clone method safely.
Retrieves a specified number of pins in the enumeration sequence.
Syntax
HRESULT Next( ULONG cPins, IPin **ppPins, ULONG *pcFetched );
Parameters
- cPins
- [in] Number of pins to retrieve.
- ppPins
- [out] Array of size cPins that is filled with IPin pointers.
- pcFetched
- [out] Pointer to a variable that receives the number of pins retrieved. Can be NULL if cPins is 1.
Return Value
Returns one of the following HRESULT values.
S_FALSE Did not retrieve as many pins as requested. S_OK Success. E_INVALIDARG Invalid argument. E_POINTER NULL pointer argument. VFW_E_ENUM_OUT_OF_SYNC The filter's state has changed and is now inconsistent with the enumerator.
Remarks
This method retrieves pointers to the specified number of pins, starting at the current position in the enumeration, and places them in the specified array.
If the method succeeds, the IPin pointers all have outstanding reference counts. Be sure to release them when you are done.
If the number of pins changes, the enumerator is no longer consistent with the filter, 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 Reset method. You can then call the Next method safely.
Resets the enumeration sequence to the beginning.
Syntax
HRESULT Reset(void);
Return Value
Returns S_OK.
Skips over a specified number of pins.
Syntax
HRESULT Skip( ULONG cPins );
Parameters
- cPins
- [in] Number of pins to skip.
Return Value
Returns one of the following HRESULT values.
S_FALSE Skipped past the end of the sequence. S_OK Success. VFW_E_ENUM_OUT_OF_SYNC The filter's state has changed and is now inconsistent with the enumerator.
Remarks
If the number of pins changes, the enumerator is no longer consistent with the filter, 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 Reset method. You can then call the Skip method safely.