hasCurrent property

bool get hasCurrent

Gets a value that indicates whether the iterator refers to a current item or is at the end of the collection.

Implementation

bool get hasCurrent {
  final retValuePtr = calloc<Bool>();

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

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

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