removeAutomationEventHandler method

void removeAutomationEventHandler(
  1. UIA_EVENT_ID eventId,
  2. IUIAutomationElement? element,
  3. IUIAutomationEventHandler? handler
)

Removes the specified UI Automation event handler.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomation-removeautomationeventhandler.

Implementation

@pragma('vm:prefer-inline')
void removeAutomationEventHandler(
  UIA_EVENT_ID eventId,
  IUIAutomationElement? element,
  IUIAutomationEventHandler? handler,
) {
  final hr$ = HRESULT(
    _RemoveAutomationEventHandlerFn(
      ptr,
      eventId,
      element?.ptr ?? nullptr,
      handler?.ptr ?? nullptr,
    ),
  );
  if (hr$.isError) throw WindowsException(hr$);
}