EndDialog function Null safety user32

int EndDialog(
  1. int hDlg,
  2. int nResult

Destroys a modal dialog box, causing the system to end any processing for the dialog box.

BOOL EndDialog(
  HWND    hDlg,
  INT_PTR nResult


int EndDialog(int hDlg, int nResult) {
  final _EndDialog = _user32.lookupFunction<
      Int32 Function(IntPtr hDlg, IntPtr nResult),
      int Function(int hDlg, int nResult)>('EndDialog');
  return _EndDialog(hDlg, nResult);