getBool method
Gets the boolean value of a specified property key.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ishellitem2-getbool.
Implementation
bool getBool(Pointer<PROPERTYKEY> key) {
final pf = adaptiveCalloc<Int32>();
final hr$ = HRESULT(_GetBoolFn(ptr, key, pf));
if (hr$.isError) {
free(pf);
throw WindowsException(hr$);
}
final result$ = pf.value;
free(pf);
return result$ != FALSE;
}