iUpdate::get_Categories 方法 (wuapi.h)

获取一个接口,该接口包含更新所属的类别集合。

此属性为只读。

语法

HRESULT get_Categories(
  ICategoryCollection **retval
);

参数

retval

返回值

无

备注

如果使用 IUpdateSession::CreateUpdateSearcher 方法创建 IUpdateSearcher 接口,则此属性返回的信息适用于用于创建 IUpdateSearcher 的会话的 IUpdateSession2 接口的 UserLocale 属性所指定的语言。

如果 IUpdateSession2 的 UserLocale 属性未指定语言首选项,或者不是使用 IUpdateSession::CreateUpdateSearcher 创建 IUpdateSearcher 接口,则此属性返回的信息适用于用户的默认用户界面 (UI) 语言。 如果用户的默认 UI 语言不可用,Windows 更新 代理 (WUA) 使用计算机的默认 UI 语言。 如果计算机的默认语言不可用,WUA 将使用更新提供程序建议的语言。

由于 IUpdate 的 Categories 属性和 IUpdateHistoryEntry2 的 Categories 属性,因此 ICategory 接口的本地化属性使用的信息取决于拥有 ICategory 接口的 WUA 对象。 如果 ICategory 接口是从 IUpdate 的 Categories 属性返回的,则它遵循 IUpdate 的本地化规则。 如果 ICategory 接口是从 IUpdateHistoryEntry2 的 Categories 属性返回的,则它遵循 IUpdateHistoryEntry2 的本地化规则。

要求

   
最低受支持的客户端 Windows XP、Windows 2000 Professional SP3 [仅限桌面应用]
最低受支持的服务器 Windows Server 2003、Windows 2000 Server SP3 [仅限桌面应用]
目标平台 Windows
标头 wuapi.h
Library Wuguid.lib
DLL Wuapi.dll

另请参阅

IUpdate