IEnumRegFilters::Next method (strmif.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
Syntax
HRESULT Next(
[in] ULONG cFilters,
[out] REGFILTER **apRegFilter,
[out] ULONG *pcFetched
);
Parameters
[in] cFilters
Number of filters.
[out] apRegFilter
Address of a pointer to an array of REGFILTER pointers.
[out] pcFetched
Pointer to the actual number of filters passed.
Return value
Returns one of the following HRESULT values.
Return code | Description |
---|---|
|
Invalid argument. |
|
Insufficient memory. |
|
NULL pointer argument. |
|
Unexpected error. |
|
Fewer filters were retrieved than requested. |
|
Success. |
|
The 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.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | strmif.h (include Dshow.h) |