共用方式為


UiaRaiseNotificationEvent 函式 (uiautomationcoreapi.h)

由提供者呼叫以起始通知事件。

語法

HRESULT UiaRaiseNotificationEvent(
  [in]           IRawElementProviderSimple *provider,
                 NotificationKind          notificationKind,
                 NotificationProcessing    notificationProcessing,
  [in, optional] BSTR                      displayString,
  [in]           BSTR                      activityId
);

參數

[in] provider

發生通知事件的提供者節點。

notificationKind

通知的類型,做為 NotificationKind 列舉 值。

notificationProcessing

處理通知的慣用方式,做為 NotificationProcessing 列舉 值。

[in, optional] displayString

要顯示在通知訊息中的字串。

[in] activityId

用來識別動作或動作群組的唯一非當地語系化字串。 使用此專案將其他資訊傳遞至事件處理程式。

傳回值

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

備註

如果您的視窗使用WS_POPUP樣式,它也必須實作視窗控件模式並處理WM_GETOBJECT訊息 (請參閱如何公開 Server-Side 使用者介面自動化 提供者以取得詳細數據) 。

規格需求

需求
最低支援的用戶端 Windows 10 版本 1709 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2016 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 uiautomationcoreapi.h (包含 UIAutomation.h)
程式庫 Uiautomationcore.lib
Dll Uiautomationcore.dll