Ejemplo n.º 1
0
        public static Version RtlGetVersion()
        {
            RTL_OSVERSIONINFOEX v = default;

            v.dwOSVersionInfoSize = (uint)Marshal.SizeOf(v);
            if (RtlGetVersion(ref v) == 0)
            {
                return(new Version((int)v.dwMajorVersion, (int)v.dwMinorVersion, (int)v.dwBuildNumber));
            }
            else
            {
                throw new Win32Exception("RtlGetVersion failed!");
            }
        }
Ejemplo n.º 2
0
 private static extern int RtlGetVersion(ref RTL_OSVERSIONINFOEX lpVersionInformation);