getGuid method
Implementation
Guid getGuid() {
final retValuePtr = calloc<GUID>();
try {
final hr = ptr.ref.vtable
.elementAt(20)
.cast<
Pointer<
NativeFunction<HRESULT Function(Pointer, Pointer<GUID>)>>>()
.value
.asFunction<
int Function(
Pointer, Pointer<GUID>)>()(ptr.ref.lpVtbl, retValuePtr);
if (FAILED(hr)) throw WindowsException(hr);
return retValuePtr.toDartGuid();
} finally {
free(retValuePtr);
}
}