Microsoft DirectX 8.0 |
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.
MethodName Description Next Retrieves the next n elements in the collection. Skip Skip the specified element in the collection without retrieving it. Reset Reset the enumerator to the beginning of the collection. Clone Create a new copy of the entire collection.
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.
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.
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.
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.