GetVersionEx function Null safety kernel32

int GetVersionEx(
  1. Pointer<OSVERSIONINFO> lpVersionInformation
)

Gets information about the operating system version.

BOOL GetVersionExW(
  LPOSVERSIONINFOW lpVersionInformation
);

Implementation

int GetVersionEx(Pointer<OSVERSIONINFO> lpVersionInformation) {
  final _GetVersionEx = _kernel32.lookupFunction<
      Int32 Function(Pointer<OSVERSIONINFO> lpVersionInformation),
      int Function(
          Pointer<OSVERSIONINFO> lpVersionInformation)>('GetVersionExW');
  return _GetVersionEx(lpVersionInformation);
}