SetDlgItemText function Null safety user32

int SetDlgItemText(
  1. int hDlg,
  2. int nIDDlgItem,
  3. Pointer<Utf16> lpString
)

Sets the title or text of a control in a dialog box.

BOOL SetDlgItemTextW(
  HWND    hDlg,
  int     nIDDlgItem,
  LPCWSTR lpString
);

Implementation

int SetDlgItemText(int hDlg, int nIDDlgItem, Pointer<Utf16> lpString) {
  final _SetDlgItemText = _user32.lookupFunction<
      Int32 Function(IntPtr hDlg, Int32 nIDDlgItem, Pointer<Utf16> lpString),
      int Function(int hDlg, int nIDDlgItem,
          Pointer<Utf16> lpString)>('SetDlgItemTextW');
  return _SetDlgItemText(hDlg, nIDDlgItem, lpString);
}