IMFAttributes::SetBlob Method

Associates a byte array with a key.

Syntax

public:
HRESULT SetBlob(
         REFGUID guidKey,
         const UINT8 *pBuf,
         UINT32 cbBufSize
)  

Parameters

guidKey
Type: REFGUID 

[in]

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

pBuf
Type: UINT8 *

[in]

Pointer to a byte array to associate with this key. The method stores a copy of the array.

cbBufSize
Type: UINT32 

Size of the array, in bytes.

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 byte array, call IMFAttributes::GetBlob or IMFAttributes::GetAllocatedBlob.

Requirements

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

Library: Use Mfuuid.lib.