pub fn check_windows_version(
major: i32,
minor: i32,
spver: i32,
os_type: OSType,
) -> boolExpand description
Returns whether the version of the Windows operating system the code is running on is at least the specified major, minor and service pack versions. See MSDN documentation for the Operating System Version. Software that needs even more detailed version and feature information should use the Win32 API VerifyVersionInfo() directly.
Successive calls of this function can be used for enabling or disabling features at run-time for a range of Windows versions, as per the VerifyVersionInfo() API documentation.
§major
major version of Windows
§minor
minor version of Windows
§spver
Windows Service Pack Level, 0 if none
§os_type
Type of Windows OS
§Returns
true if the Windows Version is the same or greater than
the specified major, minor and service pack versions, and
whether the running Windows is a workstation or server edition
of Windows, if specifically specified.