IMFCollection::AddElement Method

Adds an object to the collection.

Syntax

public:
HRESULT AddElement(
         IUnknown *pUnkElement
)  

Parameters

pUnkElement
Type: IUnknown *

[in, optional]

Pointer to the object’s IUnknown interface.

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.

Remarks

If pUnkElement is NULL, a NULL pointer is added to the collection.

Requirements

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

Library: Use mfuuid.lib.