IUIAutomationCacheRequest::AddPattern 方法 (uiautomationclient.h)

將控件模式新增至快取要求。

語法

HRESULT AddPattern(
  [in] PATTERNID patternId
);

參數

[in] patternId

類型: PATTERNID

要加入至快取要求的控件模式標識碼。 如需控件模式標識碼的清單,請參閱 控件模式識別符

傳回值

類型: HRESULT

如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

備註

新增已在快取要求中的控制項模式沒有任何作用。

規格需求

需求
最低支援的用戶端 Windows 7、Windows Vista SP2 和 Platform Update for Windows Vista、Windows XP 含 SP3 和適用於 Windows Vista 的平臺更新 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008、Windows Server 2003 SP2 和 Platform Update for Windows Server 2008 [僅限桌面應用程式]
目標平台 Windows
標頭 uiautomationclient.h (包含 UIAutomation.h)

另請參閱

IUIAutomationCacheRequest