setDateTime method

void setDateTime(
  1. DateTime value
)

Implementation

void setDateTime(DateTime value) {
  final valueDateTime =
      value.difference(DateTime.utc(1601, 01, 01)).inMicroseconds * 10;
  final hr = ptr.ref.vtable
      .elementAt(17)
      .cast<
          Pointer<NativeFunction<HRESULT Function(Pointer, Uint64 value)>>>()
      .value
      .asFunction<
          int Function(Pointer, int value)>()(ptr.ref.lpVtbl, valueDateTime);

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