AppendMenu function Null safety user32

int AppendMenu(
  1. int hMenu,
  2. int uFlags,
  3. int uIDNewItem,
  4. Pointer<Utf16> lpNewItem

Appends a new item to the end of the specified menu bar, drop-down menu, submenu, or shortcut menu. You can use this function to specify the content, appearance, and behavior of the menu item.

BOOL AppendMenuW(
  HMENU    hMenu,
  UINT     uFlags,
  UINT_PTR uIDNewItem,
  LPCWSTR  lpNewItem


int AppendMenu(
    int hMenu, int uFlags, int uIDNewItem, Pointer<Utf16> lpNewItem) {
  final _AppendMenu = _user32.lookupFunction<
      Int32 Function(IntPtr hMenu, Uint32 uFlags, IntPtr uIDNewItem,
          Pointer<Utf16> lpNewItem),
      int Function(int hMenu, int uFlags, int uIDNewItem,
          Pointer<Utf16> lpNewItem)>('AppendMenuW');
  return _AppendMenu(hMenu, uFlags, uIDNewItem, lpNewItem);