createProxyFactoryEntry method
Creates a new instance of a proxy factory object.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomation-createproxyfactoryentry.
Implementation
IUIAutomationProxyFactoryEntry? createProxyFactoryEntry(
IUIAutomationProxyFactory? factory,
) {
final factoryEntry = adaptiveCalloc<VTablePointer>();
final hr$ = HRESULT(
_CreateProxyFactoryEntryFn(ptr, factory?.ptr ?? nullptr, factoryEntry),
);
if (hr$.isError) {
free(factoryEntry);
throw WindowsException(hr$);
}
final result$ = factoryEntry.value;
free(factoryEntry);
if (result$.isNull) return null;
return .new(result$);
}