getDouble method

double getDouble()

Implementation

double getDouble() {
  final value = calloc<Double>();

  try {
    final hr = ptr.ref.vtable
            .elementAt(16)
            .cast<
                Pointer<
                    NativeFunction<
                        HRESULT Function(
                            VTablePointer lpVtbl, Pointer<Double> value)>>>()
            .value
            .asFunction<
                int Function(VTablePointer lpVtbl, Pointer<Double> value)>()(
        ptr.ref.lpVtbl, value);

    if (FAILED(hr)) throwWindowsException(hr);

    return value.value;
  } finally {
    free(value);
  }
}