IPortableDeviceValues 接口 (portabledevicetypes.h)

IPortableDeviceValues 接口保存 PROPERTYKEY/PROPVARIANT 对的集合。 集合中的值不需要都是相同的 VARTYPE。 值存储为键值对;每个键在集合中必须是唯一的。 客户端可以按 PROPERTYKEY 或从零开始的索引搜索项。 数据值存储为 PROPVARIANT 结构。 可以使用泛型方法 SetValueGetValue 添加或检索任何类型的值,也可以使用特定于所添加数据类型的方法添加项。

The Get...方法要求调用方适当释放任何检索到的值。 The Set...方法将值复制到集合中。

释放 IPortableDeviceValues 接口时,它会调用 Clear,以适当方式释放为其所有成员分配的内存

可以从方法检索此接口,或者,如果需要新对象,请使用 CLSID_PortableDeviceValues 调用 CoCreate。

继承

IPortableDeviceValues 接口继承自 IUnknown 接口。 IPortableDeviceValues 还具有以下类型的成员:

方法

IPortableDeviceValues 接口包含以下方法。

 
IPortableDeviceValues::Clear

了解此方法如何从集合中删除所有项。
IPortableDeviceValues::CopyValuesFromPropertyStore

将 IPropertyStore 的内容复制到集合中。
IPortableDeviceValues::CopyValuesToPropertyStore

将集合中的所有值复制到 IPropertyStore 接口中。
IPortableDeviceValues::GetAt

通过从零开始的索引从集合中检索值。
IPortableDeviceValues::GetBoolValue

(键指定的类型VT_BOOL) 检索布尔值。
IPortableDeviceValues::GetBufferValue

GetBufferValue 接口 (键指定的类型VT_VECTOR或VT_UI1) 检索字节数组值。
IPortableDeviceValues::GetCount

检索集合中的项数。
IPortableDeviceValues::GetErrorValue

检索由键指定的类型VT_ERROR) (HRESULT 值。
IPortableDeviceValues::GetFloatValue

GetFloatValue 方法 (键指定的类型VT_R4) 检索 FLOAT 值。
IPortableDeviceValues::GetGuidValue

(键指定的类型VT_CLSID) 检索 GUID 值。
IPortableDeviceValues::GetIPortableDeviceKeyCollectionValue

检索由键指定的类型VT_UNKNOWN) (IPortableDeviceKeyCollection 值。
IPortableDeviceValues::GetIPortableDevicePropVariantCollectionValue

检索由键指定的类型VT_UNKNOWN) (IPortableDevicePropVariantCollection 值。
IPortableDeviceValues::GetIPortableDeviceValuesCollectionValue

检索 IPortableDeviceValuesCollection (键指定的类型VT_UNKNOWN) 值。
IPortableDeviceValues::GetIPortableDeviceValuesValue

检索由键指定的类型VT_UNKNOWN) (IPortableDeviceValues 值。
IPortableDeviceValues::GetIUnknownValue

检索由键指定的类型VT_UNKNOWN) (IUnknown 接口值。
IPortableDeviceValues::GetKeyValue

检索由键指定的类型VT_UNKNOWN) (PROPERTYKEY 值。
IPortableDeviceValues::GetSignedIntegerValue

检索由键指定的类型VT_I4) (LONG 值。
IPortableDeviceValues::GetSignedLargeIntegerValue

(键指定的类型VT_I8) 检索 LONGLONG 值。
IPortableDeviceValues::GetStringValue

检索由键指定的类型VT_LPWSTR) (字符串值。
IPortableDeviceValues::GetUnsignedIntegerValue

检索由键指定的类型VT_UI4) (ULONG 值。
IPortableDeviceValues::GetUnsignedLargeIntegerValue

检索由键指定的类型VT_UI8) (ULONGLONG 值。
IPortableDeviceValues::GetValue

GetValue 接口检索由键指定的 PROPVARIANT 值。
IPortableDeviceValues::RemoveValue

RemoveValue 方法从集合中删除项。
IPortableDeviceValues::SetBoolValue

将新的布尔值 (类型VT_BOOL) 或覆盖现有的布尔值。
IPortableDeviceValues::SetBufferValue

将新的 BYTE* 值 (类型VT_VECTOR或VT_UI1) 或覆盖现有值。
IPortableDeviceValues::SetErrorValue

将新的 HRESULT 值 (类型VT_ERROR) 或覆盖现有值。
IPortableDeviceValues::SetFloatValue

(类型添加新的 FLOAT 值VT_R4) 或覆盖现有 FLOAT 值。
IPortableDeviceValues::SetGuidValue

将新的 GUID 值 (类型VT_CLSID) 或覆盖现有 GUID 值。
IPortableDeviceValues::SetIPortableDeviceKeyCollectionValue

将新的 SetIPortableDeviceKeyCollectionValue 值 (类型VT_UNKNOWN) 或覆盖现有类型。
IPortableDeviceValues::SetIPortableDevicePropVariantCollectionValue

将新的 IPortableDevicePropVariantCollection 值 (类型VT_UNKNOWN) 或覆盖现有类型。
IPortableDeviceValues::SetIPortableDeviceValuesCollectionValue

将新的 IPortableDeviceValuesCollection 值 (类型VT_UNKNOWN) 或覆盖现有类型。
IPortableDeviceValues::SetIPortableDeviceValuesValue

将新的 IPortableDeviceValues 值 (类型VT_UNKNOWN) 或覆盖现有值。
IPortableDeviceValues::SetIUnknownValue

(类型VT_UNKNOWN) 添加新的 IUnknown 值,或覆盖现有值。
IPortableDeviceValues::SetKeyValue

将新的 REFPROPERTYKEY 值 (类型VT_UNKNOWN) 或覆盖现有值。
IPortableDeviceValues::SetSignedIntegerValue

将新的 LONG 值 (类型VT_I4) 或覆盖现有值。
IPortableDeviceValues::SetSignedLargeIntegerValue

将新的 LONGLONG 值 (类型VT_I8) 或覆盖现有值。
IPortableDeviceValues::SetStringValue

(类型添加新的字符串值VT_LPWSTR) 或覆盖现有字符串值。
IPortableDeviceValues::SetUnsignedIntegerValue

将新的 ULONG 值 (类型VT_UI4) 或覆盖现有 ULONG 值。
IPortableDeviceValues::SetUnsignedLargeIntegerValue

将新的 ULONGLONG 值 (类型VT_UI8) 或覆盖现有值。
IPortableDeviceValues::SetValue

添加新值或覆盖现有值。

要求

要求
目标平台 Windows
标头 portabledevicetypes.h

另请参阅

集合接口