IntersectRect function Null safety user32

int IntersectRect(
  1. Pointer<RECT> lprcDst,
  2. Pointer<RECT> lprcSrc1,
  3. Pointer<RECT> lprcSrc2
)

The IntersectRect function calculates the intersection of two source rectangles and places the coordinates of the intersection rectangle into the destination rectangle. If the source rectangles do not intersect, an empty rectangle (in which all coordinates are set to zero) is placed into the destination rectangle.

BOOL IntersectRect(
  LPRECT     lprcDst,
  const RECT *lprcSrc1,
  const RECT *lprcSrc2
);

Implementation

int IntersectRect(
    Pointer<RECT> lprcDst, Pointer<RECT> lprcSrc1, Pointer<RECT> lprcSrc2) {
  final _IntersectRect = _user32.lookupFunction<
      Int32 Function(Pointer<RECT> lprcDst, Pointer<RECT> lprcSrc1,
          Pointer<RECT> lprcSrc2),
      int Function(Pointer<RECT> lprcDst, Pointer<RECT> lprcSrc1,
          Pointer<RECT> lprcSrc2)>('IntersectRect');
  return _IntersectRect(lprcDst, lprcSrc1, lprcSrc2);
}