HRESULT UiaAddEvent( HUIANODE hnode, EVENTID eventId, UiaEventCallback *pCallback, TreeScope scope, PROPERTYID *pProperties, int cProperties, UiaCacheRequest *pRequest, HUIAEVENT *phEvent );
The node to add an event listener to.
The identifier of the event to listen for. For a list of event IDs, see Event Identifiers.
The address of the application-defined UiaEventCallback callback function that is called when the event is raised.
A value from the TreeScope enumerated type indicating the scope of events to be handled; that is, whether they are on the element itself, or on its ancestors and children.
The address of an array that contains the identifiers of the properties to monitor for change events, when eventId is the EVENTID derived from AutomationPropertyChanged_Event_GUID; otherwise this parameter is NULL. For a list of property IDs, see Property Identifiers.
The count of elements in the pProperties array.
The address of a UiaCacheRequest structure that defines the cache request in effect for nodes that are returned with events.
When this function returns, contains a pointer to the event that is added. This parameter is passed uninitialized.
Returns S_OK if successful or an error value otherwise.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|