IPortableDeviceProperties::GetValues method (portabledeviceapi.h)

The GetValues method retrieves a list of specified properties from a specified object on a device.

Syntax

HRESULT GetValues(
  [in]  LPCWSTR                      pszObjectID,
  [in]  IPortableDeviceKeyCollection *pKeys,
  [out] IPortableDeviceValues        **ppValues
);

Parameters

[in] pszObjectID

Pointer to a null-terminated string that contains the ID of the object to query. To specify the device, use WPD_DEVICE_OBJECT_ID.

[in] pKeys

Pointer to an IPortableDeviceKeyCollection interface that contains one or more properties to query for. If this is NULL, all properties will be retrieved. See Properties and Attributes for a list of properties that are defined by Windows Portable Devices.

[out] ppValues

Address of a variable that receives a pointer to an IPortableDeviceValues interface that contains the requested property values. These will be returned as PROPERTYKEY/value pairs, where the data type of the value depends on the property. If a value could not be retrieved for some reason, the returned type will be VT_ERROR, and contain an HRESULT value describing the retrieval error. The caller must release this interface when it is done with it.

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
All requested property values were retrieved.
S_FALSE
One or more property values could not be retrieved. The problem properties will have an HRESULT value in the retrieved ppValues parameter.

Requirements

Requirement Value
Target Platform Windows
Header portabledeviceapi.h
Library PortableDeviceGUIDs.lib

See also

IPortableDeviceProperties Interface

IPortableDeviceProperties::SetValues

Retrieving Content-Object Properties

Retrieving Properties for a Single Object

Retrieving the Rendering Capabilities Supported by a Device