IMFAttributes::SetString Method

Associates a wide-character string with a key.

Syntax

public:
HRESULT SetString(
         REFGUID guidKey,
         LPCWSTR wszValue
)  

Parameters

guidKey
Type: REFGUID 

[in]

GUID that identifies the value to set. If this key already exists, the method overwrites the old value.

wszValue
Type: LPCWSTR 

[in]

Null-terminated wide-character string to associate with this key. The method stores a copy of the string.

Return value

Type: HRESULT 

The method 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

To retrieve the string, call IMFAttributes::GetString or IMFAttributes::GetAllocatedString.

Requirements

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

Library: Use Mfuuid.lib.