IPortableDeviceValues::SetStringValue

banner art

Previous Next

IPortableDeviceValues::SetStringValue

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

Syntax

  HRESULT SetStringValue(
  REFPROPERTYKEY  key,
  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 Values

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

Header: Defined in PortableDeviceTypes.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next