Expand Minimize

MFGetAttributesAsBlob function

Converts the contents of an attribute store to a byte array.

Syntax


HRESULT MFGetAttributesAsBlob(
  _In_   IMFAttributes *pAttributes,
  _Out_  UINT8 *pBuf,
  _In_   UINT cbBufSize
);

Parameters

pAttributes [in]

Pointer to the IMFAttributes interface of the attribute store.

pBuf [out]

Pointer to an array that receives the attribute data.

cbBufSize [in]

Size of the pBuf array, in bytes. To get the required size of the buffer, call MFGetAttributesAsBlobSize.

Return value

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

Return codeDescription
S_OK

The function succeeded.

MF_E_BUFFERTOOSMALL

The buffer given in pBuf is too small.

 

Remarks

The function skips any attributes with IUnknown pointer values (MF_ATTRIBUTE_IUNKNOWN); they are not stored in the array.

To convert the byte array back into an attribute store, call MFInitAttributesFromBlob.

To write an attribute store to a stream, call the MFSerializeAttributesToStream function.

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
Attributes and Properties

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.