SendDlgItemMessage function Null safety user32

int SendDlgItemMessage(
  1. int hDlg,
  2. int nIDDlgItem,
  3. int Msg,
  4. int wParam,
  5. int lParam
)

Sends a message to the specified control in a dialog box.

LRESULT SendDlgItemMessageW(
  HWND   hDlg,
  int    nIDDlgItem,
  UINT   Msg,
  WPARAM wParam,
  LPARAM lParam
);

Implementation

int SendDlgItemMessage(
    int hDlg, int nIDDlgItem, int Msg, int wParam, int lParam) {
  final _SendDlgItemMessage = _user32.lookupFunction<
      IntPtr Function(IntPtr hDlg, Int32 nIDDlgItem, Uint32 Msg, IntPtr wParam,
          IntPtr lParam),
      int Function(int hDlg, int nIDDlgItem, int Msg, int wParam,
          int lParam)>('SendDlgItemMessageW');
  return _SendDlgItemMessage(hDlg, nIDDlgItem, Msg, wParam, lParam);
}