MFGetAttributeString function (mfapi.h)

Gets a string value from an attribute store.

Syntax

HRESULT MFGetAttributeString(
  [in]  IMFAttributes *pAttributes,
  [in]  REFGUID       guidKey,
  [out] PWSTR         *ppsz
);

Parameters

[in] pAttributes

A pointer to the IMFAttributes interface.

[in] guidKey

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

[out] ppsz

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

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

Remarks

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

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header mfapi.h

See also

Media Foundation Functions