fullChargeCapacityInMilliwattHours property

int? fullChargeCapacityInMilliwattHours

Implementation

int? get fullChargeCapacityInMilliwattHours {
  final retValuePtr = calloc<COMObject>();

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

    if (FAILED(hr)) throw WindowsException(hr);
    return IReference<int>.fromRawPointer(retValuePtr,
            referenceIid: '{548cefbd-bc8a-5fa0-8df2-957440fc8bf4}')
        .value;
  } finally {
    free(retValuePtr);
  }
}