Associates an IUnknown pointer with a key.
public:
HRESULT SetUnknown(
REFGUID guidKey,
IUnknown *pUnknown
)
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.
Type: HRESULT
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
| S_OK | The method succeeded. |
Refer to Media Foundation return codes.
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.
Header: Declared in mfobjects.h (include mfidl.h).
Library: Use Mfuuid.lib.