getAttribute method
Throws a WindowsException on failure.
Implementation
BSTR getAttribute(BSTR attributeName) {
final attributeValue = adaptiveCalloc<Pointer<Utf16>>();
final hr$ = HRESULT(_GetAttributeFn(ptr, attributeName, attributeValue));
if (hr$.isError) {
free(attributeValue);
throw WindowsException(hr$);
}
final result$ = attributeValue.value;
free(attributeValue);
return .new(result$);
}