ReadConsole function Null safety kernel32

int ReadConsole(
  1. int hConsoleInput,
  2. Pointer<NativeType> lpBuffer,
  3. int nNumberOfCharsToRead,
  4. Pointer<Uint32> lpNumberOfCharsRead,
  5. Pointer<Void> pInputControl
)

Reads character input from the console input buffer and removes it from the buffer.

BOOL WINAPI ReadConsoleW(
  _In_     HANDLE  hConsoleInput,
  _Out_    LPVOID  lpBuffer,
  _In_     DWORD   nNumberOfCharsToRead,
  _Out_    LPDWORD lpNumberOfCharsRead,
  _In_opt_ LPVOID  pInputControl
);

Implementation

int ReadConsole(int hConsoleInput, Pointer lpBuffer, int nNumberOfCharsToRead,
        Pointer<Uint32> lpNumberOfCharsRead, Pointer<Void> pInputControl) =>
    _ReadConsole(hConsoleInput, lpBuffer, nNumberOfCharsToRead,
        lpNumberOfCharsRead, pInputControl);