Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

IPortableDeviceValues interface

The IPortableDeviceValues interface holds a collection of PROPERTYKEY/PROPVARIANT pairs. Values in the collection do not need to be all the same VARTYPE. Values are stored as key-value pairs; each key must be unique in the collection. Clients can search for items by PROPERTYKEY or zero-based index. Data values are stored as PROPVARIANT structures. You can add or retrieve values of any type by using the generic methods SetValue and GetValue, or you add items by using the method specific to the type of data added.

The Get... methods require the caller to release any retrieved values appropriately. The Set... methods copy the value into the collection.

When an IPortableDeviceValues interface is released, it calls Clear, which frees the memory that was allocated for all its members appropriately

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

Members

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

Methods

The IPortableDeviceValues interface has these methods.

MethodDescription
Clear

Deletes all items from the collection.

CopyValuesFromPropertyStore

Copies the contents of an IPropertyStore into the collection.

CopyValuesToPropertyStore

Copies all the values from a collection into an IPropertyStore interface.

GetAt

Retrieves a value from the collection, by index.

GetBoolValue

Retrieves a BOOL value (type VT_BOOL), specified by a key.

GetBufferValue

Retrieves a byte array value (type VT_VECTOR | VT_UI1) specified by a key.

GetCount

Retrieves the number of items that are in the collection.

GetErrorValue

Retrieves an HRESULT (type VT_ERROR) value that is specified by a key.

GetFloatValue

Retrieves a FLOAT value (type VT_R4) that is specified by a key.

GetGuidValue

Retrieves a GUID value (type VT_CLSID) that is specified by a key.

GetIPortableDeviceKeyCollectionValue

Retrieves an IPortableDeviceKeyCollection (type VT_UNKNOWN) value that is specified by a key.

GetIPortableDevicePropVariantCollectionValue

Retrieves an IPortableDevicePropVariantCollection value (type VT_UNKNOWN) that is specified by a key.

GetIPortableDeviceValuesCollectionValue

Retrieves an IPortableDeviceValuesCollection value (type VT_UNKNOWN) that is specified by a key.

GetIPortableDeviceValuesValue

Retrieves an IPortableDeviceValues value (type VT_UNKNOWN) that is specified by a key.

GetIUnknownValue

Retrieves an IUnknown interface value (type VT_UNKNOWN) that is specified by a key.

GetKeyValue

Retrieves a PROPERTYKEY value that is specified by a key.

GetSignedIntegerValue

Retrieves a LONG value (type VT_I4) that is specified by a key.

GetSignedLargeIntegerValue

Retrieves a LONGLONG value (type VT_I8) that is specified by a key.

GetStringValue

Retrieves a string value (type VT_LPWSTR) that is specified by a key.

GetUnsignedIntegerValue

Retrieves a ULONG value (type VT_UI4) that is specified by a key.

GetUnsignedLargeIntegerValue

Retrieves a ULONGLONG value (type VT_UI8) that is specified by a key.

GetValue

Retrieves a PROPVARIANT value that is specified by a key.

RemoveValue

Removes an item from the collection.

SetBoolValue

Adds a new Boolean value (type VT_BOOL) or overwrites an existing one.

SetBufferValue

Adds a new BYTE* value (type VT_VECTOR | VT_UI1) or overwrites an existing one.

SetErrorValue

Adds a new HRESULT value (type VT_ERROR) or overwrites an existing one.

SetFloatValue

Adds a new FLOAT value (type VT_R4) or overwrites an existing one.

SetGuidValue

Adds a new GUID value (type VT_CLSID) or overwrites an existing one.

SetIPortableDeviceKeyCollectionValue

Adds a new IPortableDeviceKeyCollectionValue value (type VT_UNKNOWN) or overwrites an existing one.

SetIPortableDevicePropVariantCollectionValue

Adds a new IPortableDevicePropVariantCollection value (type VT_UNKNOWN) or overwrites an existing one.

SetIPortableDeviceValuesCollectionValue

Adds a new IPortableDeviceValuesCollection value (type VT_UNKNOWN) or overwrites an existing one.

SetIPortableDeviceValuesValue

Adds a new IPortableDeviceValues value (type VT_UNKNOWN) or overwrites an existing one.

SetIUnknownValue

Adds a new IUnknown value (type VT_UNKNOWN) or overwrites an existing one.

SetKeyValue

Adds a new PROPERTYKEY value or overwrites an existing one.

SetSignedIntegerValue

Adds a new LONG value (type VT_I4) or overwrites an existing one.

SetSignedLargeIntegerValue

Adds a new LONGLONG value (type VT_I8) or overwrites an existing one.

SetStringValue

Adds a new string value (type VT_LPWSTR) or overwrites an existing one.

SetUnsignedIntegerValue

Adds a new ULONG value (type VT_UI4) or overwrites an existing one.

SetUnsignedLargeIntegerValue

Adds a new ULONGLONG value (type VT_UI8) or overwrites an existing one.

SetValue

Adds a new value or overwrites an existing one.

 

Requirements

Header

PortableDeviceTypes.h

See also

Collection Interfaces

 

 

Send comments about this topic to Microsoft

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.