MFSerializeAttributesToStream

Writes the contents of an attribute store to a stream.

Syntax

HRESULT MFSerializeAttributesToStream(
         IMFAttributes *pAttr,
         DWORD dwOptions,
         IStream *pStm
)  

Parameters

pAttr
Type: IMFAttributes *

Pointer to the IMFAttributes interface of the attribute store.

dwOptions
Type: DWORD 

Bitwise OR of zero or more flags from the MF_ATTRIBUTE_SERIALIZE_OPTIONS enumeration.

pStm
Type: IStream *

Pointer to the IStream interface of the stream where the attributes are saved.

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 method succeeded.

Refer to Media Foundation return codes.

Remarks

If dwOptions contains the MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF flag, the function serializes IUnknown pointers in the attribute store, as follows:

If dwOptions does not include the MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF flag, the function skips IUnknown pointers in the attribute store.

To load the attributes from the stream, call MFDeserializeAttributesFromStream.

The main purpose of this function is to marshal attributes across process boundaries.

Requirements

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

Library: Use mfplat.lib.