On Fri Sep 29 17:09:34 2023 +0000, Connor McAdams wrote:
You can pass another event ID, but whatever you pass to the sink has to match the current HUIAEVENT being evaluated. When a WinEvent is received, i.e `EVENT_OBJECT_FOCUS`, each registered `UIA_AutomationFocusChangedEventId` HUIAEVENT passes an `IProxyProviderWinEventSink` to the `IProxyProviderWinEventHandler` on the node. The event passed to the sink is then evaluated to check if it matches the HUIAEVENT. Passing a different event ID is an immediate 'non-match' condition.
I think in theory here, you're able to have a single WinEvent mapped to multiple UIA events. And in that case, you'd have a unified `RespondToWinEvent()` implementation that just added all events you intend to raise for the translation to the sink each time, and if one matches the event currently being evaluated it proceeds.
https://learn.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-ui...