getNamedBoolean method
Implementation
bool getNamedBoolean(String name) {
final retValuePtr = calloc<Bool>();
final nameHstring = convertToHString(name);
try {
final hr =
ptr.ref.vtable
.elementAt(12)
.cast<
Pointer<
NativeFunction<
HRESULT Function(
Pointer, IntPtr name, Pointer<Bool>)>>>()
.value
.asFunction<int Function(Pointer, int name, Pointer<Bool>)>()(
ptr.ref.lpVtbl, nameHstring, retValuePtr);
if (FAILED(hr)) throw WindowsException(hr);
final retValue = retValuePtr.value;
return retValue;
} finally {
WindowsDeleteString(nameHstring);
free(retValuePtr);
}
}