cachedState property

int cachedState

Implementation

int get cachedState {
  final retValuePtr = calloc<Uint32>();

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

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

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