isConnected property

int get isConnected

Implementation

int get isConnected {
  final retValuePtr = calloc<Int16>();

  try {
    final hr = (ptr.ref.vtable + 12)
        .cast<
          Pointer<
            NativeFunction<
              Int32 Function(Pointer, Pointer<Int16> pbIsConnected)
            >
          >
        >()
        .value
        .asFunction<
          int Function(Pointer, Pointer<Int16> pbIsConnected)
        >()(ptr.ref.lpVtbl, retValuePtr);

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

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