IPortableDeviceValues::SetStringValue method (portabledevicetypes.h)

Adds a new string value (type VT_LPWSTR) or overwrites an existing one.

Syntax

HRESULT SetStringValue(
  [in] REFPROPERTYKEY key,
  [in] LPCWSTR        Value
);

Parameters

[in] key

A REFPROPERTYKEY that specifies the item to create or overwrite.

[in] Value

A LPCWSTR that specifies the new value. The string is copied, so the caller can release the memory allocated for this value after calling this method.

Return value

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

Return code Description
S_OK
The method succeeded.

Remarks

Any existing key memory will be released appropriately.

Requirements

Requirement Value
Target Platform Windows
Header portabledevicetypes.h

See also

IPortableDeviceValues Interface

IPortableDeviceValues::GetStringValue