changeClock method

void changeClock(
  1. String value
)

Implementation

void changeClock(String value) {
  final valueHstring = convertToHString(value);

  final hr = ptr.ref.vtable
      .elementAt(15)
      .cast<
          Pointer<NativeFunction<HRESULT Function(Pointer, IntPtr value)>>>()
      .value
      .asFunction<
          int Function(Pointer, int value)>()(ptr.ref.lpVtbl, valueHstring);

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

  WindowsDeleteString(valueHstring);
}