Exposes methods that are called to notify the root element of a fragment when a UI Automation client application begins or ends listening for events on that fragment.
AdviseEventAdded Notifies the UI Automation provider when a UI Automation client begins listening for a specific event, including a property-changed event. AdviseEventRemoved Notifies the UI Automation provider when a UI Automation client stops listening for a specific event, including a property-changed event.
Implementation of this interface is optional. It can be used to improve performance by raising events only when they are being listened for.
Similar to implementing reference counting in Component Object Model (COM) programming, it is important for Microsoft UI Automation providers to treat the IRawElementProviderAdviseEvents::AdviseEventAdded and IRawElementProviderAdviseEvents::AdviseEventRemoved methods like the AddRef and Release methods of the IUnknown interface. As long as AdviseEventAdded has been called more times than AdviseEventRemoved for a specific event or property, the provider should continue to raise corresponding events, because some clients are still listening. Alternatively, UI Automation providers can use the UiaClientsAreListening function to determine if at least one client is listening and, if so, raise all appropriate events.
Inherits from IUnknown Header and IDL files uiautomation.h, uiautomationcore.idl Minimum operating systems Windows XP