SetConsoleDisplayMode function kernel32

Win32Result<bool> SetConsoleDisplayMode(
  1. HANDLE hConsoleOutput,
  2. int dwFlags,
  3. Pointer<COORD>? lpNewScreenBufferDimensions
)

Sets the display mode of the specified console screen buffer.

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

Implementation

Win32Result<bool> SetConsoleDisplayMode(
  HANDLE hConsoleOutput,
  int dwFlags,
  Pointer<COORD>? lpNewScreenBufferDimensions,
) {
  final result_ = SetConsoleDisplayMode_Wrapper(
    hConsoleOutput,
    dwFlags,
    lpNewScreenBufferDimensions ?? nullptr,
  );
  return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}