EnableMenuItem function Null safety user32

int EnableMenuItem(
  1. int hMenu,
  2. int uIDEnableItem,
  3. int uEnable
)

Enables, disables, or grays the specified menu item.

BOOL EnableMenuItem(
  HMENU hMenu,
  UINT  uIDEnableItem,
  UINT  uEnable
);

Implementation

int EnableMenuItem(int hMenu, int uIDEnableItem, int uEnable) {
  final _EnableMenuItem = _user32.lookupFunction<
      Int32 Function(IntPtr hMenu, Uint32 uIDEnableItem, Uint32 uEnable),
      int Function(
          int hMenu, int uIDEnableItem, int uEnable)>('EnableMenuItem');
  return _EnableMenuItem(hMenu, uIDEnableItem, uEnable);
}