currentLabeledBy property

IUIAutomationElement? get currentLabeledBy

Retrieves the element that contains the text label for this element.

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

Implementation

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