예제 #1
0
        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));
        }
예제 #2
0
        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));
        }
예제 #3
0
 internal static extern int RtlGetVersion(out InteropValues.RTL_OSVERSIONINFOEX lpVersionInformation);