GetConsoleSelectionInfo function Null safety kernel32

int GetConsoleSelectionInfo(
  1. Pointer<CONSOLE_SELECTION_INFO> lpConsoleSelectionInfo
)

Retrieves information about the current console selection.

BOOL WINAPI GetConsoleSelectionInfo(
  _Out_ PCONSOLE_SELECTION_INFO lpConsoleSelectionInfo
);

Implementation

int GetConsoleSelectionInfo(
    Pointer<CONSOLE_SELECTION_INFO> lpConsoleSelectionInfo) {
  final _GetConsoleSelectionInfo = _kernel32.lookupFunction<
      Int32 Function(Pointer<CONSOLE_SELECTION_INFO> lpConsoleSelectionInfo),
      int Function(
          Pointer<CONSOLE_SELECTION_INFO>
              lpConsoleSelectionInfo)>('GetConsoleSelectionInfo');
  return _GetConsoleSelectionInfo(lpConsoleSelectionInfo);
}