getDouble method

double getDouble()

Implementation

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

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

    if (FAILED(hr)) throw WindowsException(hr);

    final retValue = retValuePtr.value;
    return retValue;
  } finally {
    free(retValuePtr);
  }
}