IPortableDeviceProperties::GetValues

banner art

Previous Next

IPortableDeviceProperties::GetValues

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

Syntax

  HRESULT GetValues(
  LPCWSTR  pszObjectID,
  IPortableDeviceKeyCollection*  pKeys,
  IPortableDeviceValues**  ppValues
);

Parameters

pszObjectID

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

pKeys

[in]  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.

ppValues

[out]  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 Values

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

Header: Defined in PortableDeviceApi.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next