FillConsoleOutputCharacter function Null safety kernel32

int FillConsoleOutputCharacter(
  1. int hConsoleOutput,
  2. int cCharacter,
  3. int nLength,
  4. COORD dwWriteCoord,
  5. Pointer<Uint32> lpNumberOfCharsWritten
)

Writes a character to the console screen buffer a specified number of times, beginning at the specified coordinates.

BOOL WINAPI FillConsoleOutputCharacterW(
  _In_  HANDLE  hConsoleOutput,
  _In_  TCHAR   cCharacter,
  _In_  DWORD   nLength,
  _In_  COORD   dwWriteCoord,
  _Out_ LPDWORD lpNumberOfCharsWritten
);

Implementation

int FillConsoleOutputCharacter(int hConsoleOutput, int cCharacter, int nLength,
    COORD dwWriteCoord, Pointer<Uint32> lpNumberOfCharsWritten) {
  final _FillConsoleOutputCharacter = _kernel32.lookupFunction<
      Int32 Function(IntPtr hConsoleOutput, Uint16 cCharacter, Uint32 nLength,
          COORD dwWriteCoord, Pointer<Uint32> lpNumberOfCharsWritten),
      int Function(
          int hConsoleOutput,
          int cCharacter,
          int nLength,
          COORD dwWriteCoord,
          Pointer<Uint32>
              lpNumberOfCharsWritten)>('FillConsoleOutputCharacterW');
  return _FillConsoleOutputCharacter(hConsoleOutput, cCharacter, nLength,
      dwWriteCoord, lpNumberOfCharsWritten);
}