Microsoft DirectX 8.0

IEnumDMO Interface

This interface provides methods for enumerating Microsoft® DirectX® Media Objects (DMOs). It is based on the OLE enumeration interfaces. For more information, see the IEnumXXXX topic in the Platform SDK.

To enumerate registered DMOs, call the DMOEnum function.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterfaceRetrieves pointers to supported interfaces.
AddRefIncrements the reference count.
ReleaseDecrements the reference count.
IEnumDMO methodsDescription
NextRetrieves a specified number of items in the enumeration sequence.
SkipSkips over a specified number of items in the enumeration sequence.
ResetResets the enumeration sequence to the beginning.
CloneNot implemented.

IEnumDMO::Next

IEnumDMO Interface

Retrieves a specified number of items in the enumeration sequence.

Syntax

HRESULT Next(
    DWORD cItemsToFetch,
    CLSID *pCLSID,
    WCHAR **Names,
    DWORD *pcItemsFetched
);

Parameters

cItemsToFetch
Number of items to retrieve.
pCLSID
[out] Array of size cItemsToFetch that is filled with the CLSIDs of the enumerated DMOs.
Names
[out] Array of size cItemsToFetch that is filled with the friendly names of the enumerated DMOs.
pcItemsFetched
[out] 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 the following:

S_FALSERetrieved fewer items than requested.
S_OKRetrieved the requested number of items.
E_INVALIDARGInvalid argument.
E_OUTOFMEMORYInsufficient memory.
E_POINTERNULL pointer argument.

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.

IEnumDMO::Skip

IEnumDMO Interface

Skips over a specified number of items in the enumeration sequence.

Syntax

HRESULT Skip(
    DWORD cItemsToSkip
);

Parameters

cItemsToSkip
Number of items to skip.

Return Value

Returns S_OK if the number items skipped equals cItemsToSkip. Otherwise, returns S_FALSE.

IEnumDMO::Reset

IEnumDMO Interface

Resets the enumeration sequence to the beginning.

Syntax

HRESULT Reset(void);

Return Value

Returns S_OK.

IEnumDMO::Clone

IEnumDMO Interface

This method is not implemented.

Syntax

HRESULT Clone(
    IEnumDMO **ppEnum
);

Return Value

Returns E_NOTIMPL.