currentControllerFor property

IUIAutomationElementArray? get currentControllerFor

Retrieves an array of elements for which this element serves as the controller.

To learn more, see learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-get_currentcontrollerfor.

Implementation

IUIAutomationElementArray? get currentControllerFor {
  final retVal = adaptiveCalloc<VTablePointer>();
  final hr$ = HRESULT(_get_CurrentControllerForFn(ptr, retVal));
  if (hr$.isError) {
    free(retVal);
    throw WindowsException(hr$);
  }
  final result$ = retVal.value;
  free(retVal);
  if (result$.isNull) return null;
  return .new(result$);
}