getUInt16 method
Implementation
int getUInt16() {
final value = calloc<Uint16>();
try {
final hr = ptr.ref.vtable
.elementAt(10)
.cast<
Pointer<
NativeFunction<
HRESULT Function(
VTablePointer lpVtbl, Pointer<Uint16> value)>>>()
.value
.asFunction<
int Function(VTablePointer lpVtbl, Pointer<Uint16> value)>()(
ptr.ref.lpVtbl, value);
if (FAILED(hr)) throwWindowsException(hr);
return value.value;
} finally {
free(value);
}
}