MFGetAttributeString

Gets a string value from an attribute store.

Syntax

HRESULT MFGetAttributeString(
         IMFAttributes *pAttributes,
         REFGUID guidKey,
         PWSTR *ppsz
)  

Parameters

pAttributes
Type: IMFAttributes *

A pointer to the IMFAttributes interface.

guidKey
Type: REFGUID 

A GUID that identifies which value to retrieve. The attribute type must be MF_ATTRIBUTE_STRING.

ppsz
Type: PWSTR *

[out] If the key is found and the value is a string type, this parameter receives a copy of the string. The caller must free the memory for the string by calling CoTaskMemFree.

Return value

Type: HRESULT 

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Refer to Media Foundation return codes.

Remarks

This function is a wrapper for the IMFAttributes::GetAllocatedString method.

Requirements

Header: Declared in mfapi.h.