Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[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.]
The Next method retrieves a specified number of items in the enumeration sequence.
Syntax
HRESULT Next(
DWORD cItemsToFetch,
[out] CLSID *pCLSID,
[out] LPWSTR *Names,
[out] DWORD *pcItemsFetched
);
Parameters
cItemsToFetch
Number of items to retrieve.
[out] pCLSID
Array of size cItemsToFetch that is filled with the CLSIDs of the enumerated DMOs.
[out] Names
Array of size cItemsToFetch that is filled with the friendly names of the enumerated DMOs.
[out] pcItemsFetched
Pointer to a variable that receives the actual number of items retrieved. Can be NULL if cItemsToFetch equals 1.
Return value
Returns an HRESULT value. Possible values include those in the following table.
| Return code | Description |
|---|---|
|
Invalid argument. |
|
Insufficient memory. |
|
NULL pointer argument. |
|
Retrieved fewer items than requested. |
|
Retrieved the requested number of items. |
Remarks
If the method succeeds, the arrays given by the pCLSID and Names parameters are filled with CLSIDs and wide-character strings. The value of *pcItemsFetched specifies the number of items returned in these arrays.
The method returns S_OK if it retrieves the requested number of items (in other words, if *pcItemsFetched equals cItemsToFetch). Otherwise, it returns S_FALSE or an error code.
The caller must free the memory allocated for each string returned in the Names parameter, using the CoTaskMemFree function.
Requirements
| Requirement | Value |
|---|---|
| Target Platform | Windows |
| Header | mediaobj.h (include Dmo.h) |
| Library | Dmoguids.lib |