public static SystemVersionInfo GetSystemVersionInfo() { var osv = new InteropValues.RTL_OSVERSIONINFOEX(); osv.dwOSVersionInfoSize = (uint)Marshal.SizeOf(osv); InteropMethods.Gdip.RtlGetVersion(out osv); return(new SystemVersionInfo((int)osv.dwMajorVersion, (int)osv.dwMinorVersion, (int)osv.dwBuildNumber)); }
public static Version GetWindowsVersion() { var osv = new InteropValues.RTL_OSVERSIONINFOEX(); osv.dwOSVersionInfoSize = (uint)Marshal.SizeOf(osv); InteropMethods.Gdip.RtlGetVersion(out osv); return(new Version((int)osv.dwMajorVersion, (int)osv.dwMinorVersion, (int)osv.dwBuildNumber, (int)osv.dwRevision)); }
internal static extern int RtlGetVersion(out InteropValues.RTL_OSVERSIONINFOEX lpVersionInformation);