SetTimer function Null safety user32

int SetTimer(
  1. int hWnd,
  2. int nIDEvent,
  3. int uElapse,
  4. Pointer<NativeFunction<TimerProc>> lpTimerFunc
)

Creates a timer with the specified time-out value.

UINT_PTR SetTimer(
  HWND      hWnd,
  UINT_PTR  nIDEvent,
  UINT      uElapse,
  TIMERPROC lpTimerFunc
);

Implementation

int SetTimer(int hWnd, int nIDEvent, int uElapse,
    Pointer<NativeFunction<TimerProc>> lpTimerFunc) {
  final _SetTimer = _user32.lookupFunction<
      IntPtr Function(IntPtr hWnd, IntPtr nIDEvent, Uint32 uElapse,
          Pointer<NativeFunction<TimerProc>> lpTimerFunc),
      int Function(int hWnd, int nIDEvent, int uElapse,
          Pointer<NativeFunction<TimerProc>> lpTimerFunc)>('SetTimer');
  return _SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc);
}