Partager via


IPortableDeviceValues::GetAt

banner art

Previous Next

IPortableDeviceValues::GetAt

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

Syntax

  HRESULT GetAt(
  const DWORD  index,
  PROPERTYKEY*  pKey,
  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 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.
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 or IPortableDevicePropVariantCollection). No other interfaces can be returned by Windows Portable Devices.

Requirements

Header: Defined in PortableDeviceTypes.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next