SetConsoleWindowInfo function kernel32

Win32Result<bool> SetConsoleWindowInfo(
  1. HANDLE hConsoleOutput,
  2. bool bAbsolute,
  3. Pointer<SMALL_RECT> lpConsoleWindow
)

Sets the current size and position of a console screen buffer's window.

To learn more, see learn.microsoft.com/windows/console/setconsolewindowinfo.

Implementation

Win32Result<bool> SetConsoleWindowInfo(
  HANDLE hConsoleOutput,
  bool bAbsolute,
  Pointer<SMALL_RECT> lpConsoleWindow,
) {
  final result_ = SetConsoleWindowInfo_Wrapper(
    hConsoleOutput,
    bAbsolute ? TRUE : FALSE,
    lpConsoleWindow,
  );
  return .new(value: result_.value.i32 != FALSE, error: result_.error);
}