IPortableDeviceValues::GetIPortableDeviceKeyCollectionValue 方法 (portabledevicetypes.h)

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

语法

HRESULT GetIPortableDeviceKeyCollectionValue(
  [in]  REFPROPERTYKEY               key,
  [out] IPortableDeviceKeyCollection **ppValue
);

参数

[in] key

指定要检索的项的 REFPROPERTYKEY 键。

[out] ppValue

指向检索到的 IPortableDeviceKeyCollection 接口指针的指针。 调用方负责在检索到的接口上调用 Release

返回值

该方法返回 HRESULT。 可能的值包括(但并不限于)下表中的项。

返回代码 说明
S_OK
方法成功。
DISP_E_TYPEMISMATCH
由 key 指定的属性不是 IPortableDeviceKeyCollection 接口。
HRESULT_FROM_WIN32 (ERROR_NOT_FOUND)
由 key 指定的属性不在集合中。

备注

无。

要求

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

另请参阅

IPortableDeviceValues 接口

IPortableDeviceValues::SetIPortableDeviceKeyCollectionValue