GetAncestor function Null safety user32

int GetAncestor(
  1. int hwnd,
  2. int gaFlags
)

Retrieves the handle to the ancestor of the specified window.

HWND GetAncestor(
  HWND hwnd,
  UINT gaFlags
);

Implementation

int GetAncestor(int hwnd, int gaFlags) {
  final _GetAncestor = _user32.lookupFunction<
      IntPtr Function(IntPtr hwnd, Uint32 gaFlags),
      int Function(int hwnd, int gaFlags)>('GetAncestor');
  return _GetAncestor(hwnd, gaFlags);
}