GetWindowRect function Null safety user32

int GetWindowRect (
  1. int hWnd,
  2. Pointer<RECT> lpRect

Retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.

BOOL GetWindowRect(
  HWND   hWnd,
  LPRECT lpRect


int GetWindowRect(int hWnd, Pointer<RECT> lpRect) {
  final _GetWindowRect = _user32.lookupFunction<
      Int32 Function(IntPtr hWnd, Pointer<RECT> lpRect),
      int Function(int hWnd, Pointer<RECT> lpRect)>('GetWindowRect');
  return _GetWindowRect(hWnd, lpRect);