IPortableDeviceValues::SetIPortableDevicePropVariantCollectionValue 方法

SetIPortableDevicePropVariantCollectionValue方法會新增新的IPortableDevicePropVariantCollection值, (類型VT_UNKNOWN) 或覆寫現有的類型。

語法

HRESULT SetIPortableDevicePropVariantCollectionValue(
  [in] REFPROPERTYKEY                       key,
  [in] IPortableDevicePropVariantCollection *pValue
);

參數

機碼 [in]

REFPROPERTYKEY,指定要建立或覆寫的專案。

pValue [in]

指定新值的 IPortableDevicePropVariantCollection 介面指標。 SDK 會複製所提交介面的參考,並在其上呼叫 AddRef

傳回值

方法會傳回 HRESULT。 可能的值包括 (但不限於) 下表中的這些值。

傳回碼 描述
S_OK
此方法已成功。

備註

如果現有值具有 key 參數所指定的相同 索引鍵 ,它會覆寫現有的值,而不會發出任何警告。 現有的金鑰記憶體會適當地釋放。

規格需求

需求
標頭
PortableDeviceTypes.h
程式庫
PortableDeviceGUIDs.lib

另請參閱

IPortableDeviceValues 介面

IPortableDeviceValues::GetIPortableDevicePropVariantCollectionValue