IMFCollection::RemoveElement Method

Removes an object from the collection.

Syntax

public:
HRESULT RemoveElement(
         DWORD dwElementIndex,
         IUnknown **ppUnkElement
)  

Parameters

dwElementIndex
Type: DWORD 

Zero-based index of the object to remove. Objects are indexed in the order in which they were added to the collection.

ppUnkElement
Type: IUnknown **

[out, optional]

Receives a pointer to the IUnknown interface of the object. The caller must release the interface. This parameter cannot be NULL, but the retrieved pointer value might be NULL.

Return value

Type: HRESULT 

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codes
Return code Description
S_OK The method succeeded.

Refer to Media Foundation return codes.

Requirements

Header: Declared in mfobjects.h (include mfidl.h).

Library: Use mfuuid.lib.