addYears method

void addYears(
  1. int years
)

Implementation

void addYears(int years) {
  final hr = ptr.ref.vtable
      .elementAt(32)
      .cast<Pointer<NativeFunction<HRESULT Function(Pointer, Int32 years)>>>()
      .value
      .asFunction<int Function(Pointer, int years)>()(ptr.ref.lpVtbl, years);

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