IPortableDevicePropVariantCollection interface

The IPortableDevicePropVariantCollection interface holds a collection of indexed PROPVARIANT values of the same VARTYPE. The VARTYPE of the first item that is added to the collection determines the VARTYPE of the collection. An attempt to add an item of a different VARTYPE may fail if the PROPVARIANT value cannot be changed to the collection's current VARTYPE. To change the VARTYPE of the collection, call ChangeType.

This interface can be retrieved from a method or, if a new object is required, call CoCreate with CLSID_PortableDevicePropVariantCollection.

Members

The IPortableDevicePropVariantCollection interface inherits from the IUnknown interface. IPortableDevicePropVariantCollection also has these types of members:

Methods

The IPortableDevicePropVariantCollection interface has these methods.

Method Description
Add Adds an item to the collection.
ChangeType Converts all items in the collection to the specified VARTYPE.
Clear Frees, and then removes, all items from the collection.
GetAt Retrieves an item from the collection by a zero-based index.
GetCount Retrieves the number of items in this collection.
GetType Retrieves the data type of the items in the collection.
RemoveAt Removes the element stored at the location specified by the given index.

Requirements

Requirement Value
Header
PortableDeviceTypes.h
Library
PortableDeviceGUIDs.lib

See also

Collection Interfaces