SetMenuItemInfo function Null safety user32

int SetMenuItemInfo(
  1. int hmenu,
  2. int item,
  3. int fByPositon,
  4. Pointer<MENUITEMINFO> lpmii
)

Changes information about a menu item.

BOOL SetMenuItemInfoW(
  HMENU            hmenu,
  UINT             item,
  BOOL             fByPositon,
  LPCMENUITEMINFOW lpmii
);

Implementation

int SetMenuItemInfo(
    int hmenu, int item, int fByPositon, Pointer<MENUITEMINFO> lpmii) {
  final _SetMenuItemInfo = _user32.lookupFunction<
      Int32 Function(IntPtr hmenu, Uint32 item, Int32 fByPositon,
          Pointer<MENUITEMINFO> lpmii),
      int Function(int hmenu, int item, int fByPositon,
          Pointer<MENUITEMINFO> lpmii)>('SetMenuItemInfoW');
  return _SetMenuItemInfo(hmenu, item, fByPositon, lpmii);
}