status property

UserWatcherStatus get status

Implementation

UserWatcherStatus get status {
  final value = calloc<Int32>();

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

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

    return UserWatcherStatus.from(value.value);
  } finally {
    free(value);
  }
}