IUpdateCollection::Add 方法 (wuapi.h)

將項目新增至集合。

語法

HRESULT Add(
  [in]  IUpdate *value,
  [out] LONG    *retval
);

參數

[in] value

要加入至集合的 IUpdate 介面。

[out] retval

集合中新增介面的索引。

傳回值

如果成功 則傳回S_OK。 否則,會傳回 COM 或 Windows 錯誤碼。

這個方法也可以傳回下列錯誤碼。

傳回碼 Description
E_POINTER
參數值無效或 NULL
WU_E_NOT_SUPPORTED
集合是唯讀的。

規格需求

需求
最低支援的用戶端 Windows XP、Windows 2000 Professional 與 SP3 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2003、具有 SP3 的 Windows 2000 Server [僅限傳統型應用程式]
目標平台 Windows
標頭 wuapi.h
程式庫 Wuguid.lib
Dll Wuapi.dll

另請參閱

IUpdateCollection