compare method

int compare(
  1. Calendar? other
)

Implementation

int compare(Calendar? other) {
  final result = calloc<Int32>();

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

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

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