getCachedChildren method
Retrieves the cached child elements of this UI Automation element.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationelement-getcachedchildren.
Implementation
IUIAutomationElementArray? getCachedChildren() {
final children = adaptiveCalloc<VTablePointer>();
final hr$ = HRESULT(_GetCachedChildrenFn(ptr, children));
if (hr$.isError) {
free(children);
throw WindowsException(hr$);
}
final result$ = children.value;
free(children);
if (result$.isNull) return null;
return .new(result$);
}