TrackPopupMenuEx function Null safety user32

int TrackPopupMenuEx (
  1. int hMenu,
  2. int uFlags,
  3. int x,
  4. int y,
  5. int hwnd,
  6. Pointer<TPMPARAMS> lptpm
)

Displays a shortcut menu at the specified location and tracks the selection of items on the shortcut menu. The shortcut menu can appear anywhere on the screen.

BOOL TrackPopupMenuEx(
  HMENU hMenu,
  UINT uFlags,
  int x,
  int y,
  HWND hwnd,
  TPMPARAMS *lptpm
);

Implementation

int TrackPopupMenuEx(
    int hMenu, int uFlags, int x, int y, int hwnd, Pointer<TPMPARAMS> lptpm) {
  final _TrackPopupMenuEx = _user32.lookupFunction<
      Int32 Function(IntPtr hMenu, Uint32 uFlags, Int32 x, Int32 y, IntPtr hwnd,
          Pointer<TPMPARAMS> lptpm),
      int Function(int hMenu, int uFlags, int x, int y, int hwnd,
          Pointer<TPMPARAMS> lptpm)>('TrackPopupMenuEx');
  return _TrackPopupMenuEx(hMenu, uFlags, x, y, hwnd, lptpm);
}