AddYears method

void AddYears(
  1. int years
)

Implementation

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

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