takeHandle function
Run fn with a zeroed uint64_t *out_handle, expectAimuxError the returned
error, and hand back the handle.
Implementation
int takeHandle(
Pointer<Void> Function(Pointer<Uint64> out) fn, String context) {
final out = calloc<Uint64>();
try {
expectAimuxError(fn(out), context);
return out.value;
} finally {
calloc.free(out);
}
}