WriteConsole function Null safety kernel32

int WriteConsole(
  1. int hConsoleOutput,
  2. Pointer<NativeType> lpBuffer,
  3. int nNumberOfCharsToWrite,
  4. Pointer<Uint32> lpNumberOfCharsWritten,
  5. Pointer<NativeType> lpReserved

Writes a character string to a console screen buffer beginning at the current cursor location.

BOOL WINAPI WriteConsoleW(
  _In_             HANDLE  hConsoleOutput,
  _In_       const VOID    *lpBuffer,
  _In_             DWORD   nNumberOfCharsToWrite,
  _Out_opt_        LPDWORD lpNumberOfCharsWritten,
  _Reserved_       LPVOID  lpReserved


int WriteConsole(
        int hConsoleOutput,
        Pointer lpBuffer,
        int nNumberOfCharsToWrite,
        Pointer<Uint32> lpNumberOfCharsWritten,
        Pointer lpReserved) =>
    _WriteConsole(hConsoleOutput, lpBuffer, nNumberOfCharsToWrite,
        lpNumberOfCharsWritten, lpReserved);