IPortableDeviceValues::GetAt method

The GetAt method retrieves a value from the collection using the supplied zero-based index.

Syntax

HRESULT GetAt(
  [in]      const DWORD       index,
  [in, out]       PROPERTYKEY *pKey,
  [in, out]       PROPVARIANT *pValue
);

Parameters

index [in]

A DWORD that specifies a zero-based index in the collection.

pKey [in, out]

An optional PROPERTYKEY pointer that retrieves the key of the specified item.

pValue [in, out]

An optional PROPVARIANT that retrieves the value of the specified item. The caller must free the memory by calling PropVariantClear when 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
The method succeeded.
E_INVALIDARG
An invalid index number was specified.

Remarks

If a property indicates a value of type VT_UNKNOWN, the property will be one of the Windows Portable Devices (IPortableDeviceKeyCollection, IPortableDeviceValuesCollection, IPortableDeviceValues or IPortableDevicePropVariantCollection). No other interfaces can be returned by Windows Portable Devices.

Requirements

Requirement Value
Header
PortableDeviceTypes.h
Library
PortableDeviceGUIDs.lib

See also

IPortableDeviceValues Interface

IPortableDeviceValues::GetStringValue