IEnumMediaTypes::Next method (strmif.h)
The Next method retrieves a specified number of media types.
HRESULT Next( ULONG cMediaTypes, AM_MEDIA_TYPE **ppMediaTypes, ULONG *pcFetched );
The number of media types to retrieve.
The address of an array of AM_MEDIA_TYPE pointers. The number of elements in the array is given in the cMediaTypes parameter.
Receives the number of media types returned in ppMediaTypes. This parameter can be NULL if cMediaTypes is 1.
Returns one of the following HRESULT values.
||Did not retrieve as many media types as requested.|
||NULL pointer argument.|
||The pin's state has changed and is now inconsistent with the enumerator.|
The caller passes an array of AM_MEDIA_TYPE pointers in ppMediaTypes. The method allocates a number AM_MEDIA_TYPE structures equal to cMediaTypes or to the number of media types that remain in the enumeration, whichever is less. The number of structures allocated is returned in pcFetched. Delete each structure by calling the DeleteMediaType function.
If the set of media types changes, the enumerator becomes inconsistent with the owning pin. In that case, 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 IEnumMediaTypes::Reset method. You can then call the Next method safely.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||strmif.h (include Dshow.h)|