FlushConsoleInputBuffer function Null safety kernel32

int FlushConsoleInputBuffer(
  1. int hConsoleInput
)

Flushes the console input buffer. All input records currently in the input buffer are discarded.

BOOL WINAPI FlushConsoleInputBuffer(
  _In_ HANDLE hConsoleInput
);

Implementation

int FlushConsoleInputBuffer(int hConsoleInput) {
  final _FlushConsoleInputBuffer = _kernel32.lookupFunction<
      Int32 Function(IntPtr hConsoleInput),
      int Function(int hConsoleInput)>('FlushConsoleInputBuffer');
  return _FlushConsoleInputBuffer(hConsoleInput);
}