MFInitAttributesFromBlob

Initializes the contents of an attribute store from a byte array.

Syntax

HRESULT MFInitAttributesFromBlob(
         IMFAttributes *pAttributes,
         const UINT8 *pBuf,
         UINT cbBufSize
)  

Parameters

pAttributes
Type: IMFAttributes *

[in]

Pointer to the IMFAttributes interface of the attribute store.

pBuf
Type: UINT8 *

[in]

Pointer to the array that contains the initialization data.

cbBufSize
Type: UINT 

[in]

Size of the pBuf array, in bytes.

Return value

Type: HRESULT 

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

Return codes
Return code Description
S_OK The function succeeded.
E_INVALIDARG The buffer is not valid.

Refer to Media Foundation return codes.

Remarks

Use this function to deserialize an attribute store that was serialized with the MFGetAttributesAsBlob function.

This function deletes any attributes that were previously stored in pAttributes.

Requirements

Header: Declared in mfapi.h.

Library: Use mfplat.lib.