GetConsoleScreenBufferInfo function Null safety kernel32

int GetConsoleScreenBufferInfo(
  1. int hConsoleOutput,
  2. Pointer<CONSOLE_SCREEN_BUFFER_INFO> lpConsoleScreenBufferInfo
)

Retrieves information about the specified console screen buffer.

BOOL WINAPI GetConsoleScreenBufferInfo(
  _In_  HANDLE                      hConsoleOutput,
  _Out_ PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo
);

Implementation

int GetConsoleScreenBufferInfo(int hConsoleOutput,
    Pointer<CONSOLE_SCREEN_BUFFER_INFO> lpConsoleScreenBufferInfo) {
  final _GetConsoleScreenBufferInfo = _kernel32.lookupFunction<
          Int32 Function(IntPtr hConsoleOutput,
              Pointer<CONSOLE_SCREEN_BUFFER_INFO> lpConsoleScreenBufferInfo),
          int Function(int hConsoleOutput,
              Pointer<CONSOLE_SCREEN_BUFFER_INFO> lpConsoleScreenBufferInfo)>(
      'GetConsoleScreenBufferInfo');
  return _GetConsoleScreenBufferInfo(hConsoleOutput, lpConsoleScreenBufferInfo);
}