Retrieves an object in the collection.
public:
HRESULT GetElement(
DWORD dwElementIndex,
IUnknown **ppUnkElement
)
dwElementIndex
Type: DWORD
Zero-based index of the object to retrieve. Objects are indexed in the order in which they were added to the collection.
ppUnkElement
Type: IUnknown **
[out, optional] Receives a pointer to the object’s IUnknown interface. The caller must release the interface. The retrieved pointer value might be NULL.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Refer to Media Foundation return codes.
This method does not remove the object from the collection. To remove an object, call IMFCollection::RemoveElement.
Header: Declared in mfobjects.h (include mfidl.h).
Library: Use mfuuid.lib.