IPortableDeviceValues::SetStringValue method

The SetStringValue method adds a new string value (type VT_LPWSTR) or overwrites an existing one.

Syntax


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

Parameters

key [in]

A REFPROPERTYKEY that specifies the item to create or overwrite.

Value [in]

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 codeDescription
S_OK

The method succeeded.

 

Remarks

Any existing key memory will be released appropriately.

Examples

For an example of how to use this method, see Specifying Client Information.

Requirements

Header

PortableDeviceTypes.h

Library

PortableDeviceGUIDs.lib

See also

Adding a Resource to an Object
IPortableDeviceValues Interface
IPortableDeviceValues::GetStringValue
Setting Properties for a Single Object
Setting Properties for Multiple Objects
Specifying Client Information
Writing Content-Object Properties

 

 

Community Additions

ADD
Show: