Microsoft DirectX 8.0

IEnumRegFilters Interface

Note  This interface has been deprecated. New applications should call IFilterMapper2::EnumMatchingFilters, which enumerates monikers and returns a pointer to the IEnumMoniker interface.

This interface provides methods for enumerating registered filters. The IFilterMapper::EnumMatchingFilters method returns a pointer to this interface. However, IFilterMapper has been deprecated in favor of IFilterMapper2.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IEnumRegFilters methodsDescription
Next Fills an array with the next filters that meet the requirements.
Skip Not currently implemented.
Reset Makes the Next method start again, beginning at the first filter.
Clone Not currently implemented.

IEnumRegFilters::Clone

IEnumRegFilters Interface

Creates another enumerator with the same enumeration state as the current one.

This method is not currently implemented and returns E_NOTIMPL.

Syntax

HRESULT Clone(
    IEnumRegFilters **ppEnum
);

Parameters

ppEnum
[out] Address of a pointer to the duplicate enumerator interface.

Return Value

Returns E_NOTIMPL.

IEnumRegFilters::Next

IEnumRegFilters Interface

Fills the array with descriptions of the next set of filters (specified by the cFilters parameter) that meet the requirements specified upon creation of the enumerator.

Syntax

HRESULT Next(
    ULONG cFilters,
    REGFILTER **apRegFilter,
    ULONG *pcFetched
);

Parameters

cFilters
[in] Number of filters.
apRegFilter
[out] Address of a pointer to an array of REGFILTER pointers.
pcFetched
[out] Pointer to the actual number of filters passed.

Return Value

Returns one of the following HRESULT values.

E_INVALIDARG Invalid argument.
E_OUTOFMEMORYInsufficient memory.
E_POINTER Null pointer argument.
E_UNEXPECTEDUnexpected error.
S_FALSEFewer filters were retrieved than requested.
S_OK Success.
VFW_E_ENUM_OUT_OF_SYNCThe enumerator has become invalid. For more information, see Remarks.

Remarks

The calling application must use the Microsoft Win32 CoTaskMemFree function to free each REGFILTER pointer returned in the array. Do not free the Name member of the REGFILTER structure separately, because IEnumRegFilters::Next allocates memory for this string as part of the REGFILTER structure.

If the number of registered filters changes, the state of the enumerator will no longer be consistent with the state of the registry. As a result, this method will return VFW_E_ENUM_OUT_OF_SYNC. You should discard any data obtained from previous calls to the enumerator, because it might be invalid, and update the enumerator by calling the Reset method. You can then call the Next method safely.

IEnumRegFilters::Reset

IEnumRegFilters Interface

Resets the enumerator so that the next call to the IEnumRegFilters::Next method begins again at the first filter, if any.

Syntax

HRESULT Reset(void);

Return Value

Returns S_OK, which indicates success.

IEnumRegFilters::Skip

IEnumRegFilters Interface

Skips a specified number of items in the enumeration sequence.

This method is not currently implemented and returns E_NOTIMPL.

Syntax

HRESULT Skip(
  ULONG celt
);

Parameters

celt
[in] Number of items to skip.

Return Value

Returns E_NOTIMPL.