isEqual method

bool isEqual(
  1. HostName? hostName
)

Implementation

bool isEqual(HostName? hostName) {
  final retValuePtr = calloc<Bool>();

  try {
    final hr = ptr.ref.vtable
            .elementAt(11)
            .cast<
                Pointer<
                    NativeFunction<
                        HRESULT Function(Pointer, Pointer<COMObject> hostName,
                            Pointer<Bool>)>>>()
            .value
            .asFunction<
                int Function(
                    Pointer, Pointer<COMObject> hostName, Pointer<Bool>)>()(
        ptr.ref.lpVtbl,
        hostName == null
            ? nullptr
            : hostName.ptr.cast<Pointer<COMObject>>().value,
        retValuePtr);

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

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