IPortableDevicePropVariantCollection::GetAt method

The GetAt method retrieves an item from the collection by a zero-based index.

Syntax

HRESULT GetAt(
  [in]  const DWORD       dwIndex,
  [out]       PROPVARIANT *pValue
);

Parameters

dwIndex [in]

DWORD that contains the zero-based index of the item to retrieve.

pValue [out]

Pointer to a PROPVARIANT structure. The caller is responsible for freeing this memory by calling PropVariantClear.

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_POINTER
A required pointer argument was NULL.
E_INVALIDARG
The index that was passed in was out of range.

Examples

For an example of how to use this method see Retrieving the Functional Categories Supported by a Device.

Requirements

Requirement Value
Header
PortableDeviceTypes.h
Library
PortableDeviceGUIDs.lib

See also

IPortableDevicePropVariantCollection Interface

Retrieving an Object Identifier from a Persistent Unique Identifier

Retrieving Supported Service Events

Retrieving Supported Service Formats

Retrieving Supported Service Methods

Retrieving the Content Types Supported by a Device

Retrieving the Functional Categories Supported by a Device

Retrieving the Functional Object Identifiers for a Device

Retrieving the Rendering Capabilities Supported by a Device

Setting Properties for Multiple Objects