DefWindowProc function Null safety user32

int DefWindowProc(
  1. int hWnd,
  2. int Msg,
  3. int wParam,
  4. int lParam

Calls the default window procedure to provide default processing for any window messages that an application does not process. This function ensures that every message is processed. DefWindowProc is called with the same parameters received by the window procedure.

LRESULT DefWindowProcW(
  HWND   hWnd,
  UINT   Msg,
  WPARAM wParam,
  LPARAM lParam


int DefWindowProc(int hWnd, int Msg, int wParam, int lParam) {
  final _DefWindowProc = _user32.lookupFunction<
      IntPtr Function(IntPtr hWnd, Uint32 Msg, IntPtr wParam, IntPtr lParam),
      int Function(
          int hWnd, int Msg, int wParam, int lParam)>('DefWindowProcW');
  return _DefWindowProc(hWnd, Msg, wParam, lParam);