IMFAttributes::SetUnknown Method

Associates an IUnknown pointer with a key.

Syntax

public:
HRESULT SetUnknown(
         REFGUID guidKey,
         IUnknown *pUnknown
)  

Parameters

guidKey
Type: REFGUID 

[in]

GUID that identifies the value to set. If this key already exists, the method overwrites the old value.

pUnknown
Type: IUnknown *

[in, optional]

IUnknown pointer to be associated with this key.

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

To retrieve the IUnknown pointer, call IMFAttributes::GetUnknown.

It is not an error to call SetUnknown with pUnknown equal to NULL. However, GetUnknown will return MF_E_INVALIDTYPE.

Requirements

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

Library: Use Mfuuid.lib.