FillConsoleOutputAttribute function kernel32

Win32Result<bool> FillConsoleOutputAttribute(
  1. HANDLE hConsoleOutput,
  2. int wAttribute,
  3. int nLength,
  4. COORD dwWriteCoord,
  5. Pointer<Uint32> lpNumberOfAttrsWritten,
)

Sets the character attributes for a specified number of character cells, beginning at the specified coordinates in a screen buffer.

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

Implementation

Win32Result<bool> FillConsoleOutputAttribute(
  HANDLE hConsoleOutput,
  int wAttribute,
  int nLength,
  COORD dwWriteCoord,
  Pointer<Uint32> lpNumberOfAttrsWritten,
) {
  resolveGetLastError();
  final result_ = _FillConsoleOutputAttribute(
    hConsoleOutput,
    wAttribute,
    nLength,
    dwWriteCoord,
    lpNumberOfAttrsWritten,
  );
  return .new(value: result_ != FALSE, error: GetLastError());
}