Compartir a través de


IPortableDevicePropVariantCollection Interface

banner art

Previous Next

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.

In addition to the methods inherited from IUnknown, the IPortableDevicePropVariantCollection interface exposes the following 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

Header: Defined in PortableDeviceTypes.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next