Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPortableDeviceProperties::GetValues method

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

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 value

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

Return codeDescription
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.

 

Examples

For an example of how to use this method, see Retrieving Properties for a Single Object.

Requirements

Header

PortableDeviceApi.h

Library

PortableDeviceGUIDs.lib

See also

IPortableDeviceProperties::SetValues
IPortableDeviceProperties Interface
Retrieving Content-Object Properties
Retrieving Properties for a Single Object
Retrieving the Rendering Capabilities Supported by a Device

 

 

Community Additions

Show:
© 2017 Microsoft