GetSubMenu function Null safety user32

int GetSubMenu(
  1. int hMenu,
  2. int nPos

Retrieves a handle to the drop-down menu or submenu activated by the specified menu item.

HMENU GetSubMenu(
  HMENU hMenu,
  int nPos


int GetSubMenu(int hMenu, int nPos) {
  final _GetSubMenu = _user32.lookupFunction<
      IntPtr Function(IntPtr hMenu, Int32 nPos),
      int Function(int hMenu, int nPos)>('GetSubMenu');
  return _GetSubMenu(hMenu, nPos);