Microsoft DirectX 8.0

IEnumComponents Interface

The IEnumComponents interface provides a standard COM enumeration object for the Components (substreams) in a given program stream. C++ applications should use this interface instead of IComponents to enumerate Component objects in a specified program stream.

MethodNameDescription
NextRetrieves the next n elements in the collection.
SkipSkip the specified element in the collection without retrieving it.
ResetReset the enumerator to the beginning of the collection.
CloneCreate a new copy of the entire collection.

IEnumComponents::Next

IEnumComponents Interface

Retrieves the next n elements in the collection.

Syntax

HRESULT Next(
    ULONG celt,
    IComponent** rgelt,
    ULONG* pceltFetched
    );

Parameters

celt
[in] Variable of type ULONG that specifies the number of elements to retrieve.
rgelt
[out, size_is(celt), length_is(*pceltFetched)] Address of an array of IComponent interface pointers that will receive the retrieved Component objects.
pceltFetched
[out] Pointer to a variable of type ULONG that receives the number of elements actually retrieved.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

IEnumComponents::Skip

IEnumComponents Interface

Skip the specified element in the collection without retrieving it.

Syntax

HRESULT Skip(
    ULONG celt
    );

Parameters

celt
[in] Variable of type ULONG specifying the element to skip.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

IEnumComponents::Reset

IEnumComponents Interface

Reset the enumerator to the beginning of the collection.

Syntax

HRESULT Reset();

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

IEnumComponents::Clone

IEnumComponents Interface

Create a new copy of the entire collection.

Syntax

HRESULT Clone(
    IEnumComponents** ppEnum
    );

Parameters

ppEnum
[out] Address of an IEnumComponents interface pointer that will be set to the new collection.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

Remarks

The application must release this new collection when done with it.