Ejemplo n.º 1
0
        public static RegistryTools.Platform GetPlatform()
        {
            RegistryTools.Platform platform;
            bool flag;

            RegistryTools.SYSTEM_INFO sYSTEMINFO = new RegistryTools.SYSTEM_INFO();
            if (Environment.OSVersion.Version.Major > 5)
            {
                flag = false;
            }
            else
            {
                flag = (Environment.OSVersion.Version.Major != 5 ? true : Environment.OSVersion.Version.Minor < 1);
            }
            if (flag)
            {
                RegistryTools.GetSystemInfo(ref sYSTEMINFO);
            }
            else
            {
                RegistryTools.GetNativeSystemInfo(ref sYSTEMINFO);
            }
            ushort num = sYSTEMINFO.wProcessorArchitecture;

            if (num == 0)
            {
                platform = RegistryTools.Platform.X86;
            }
            else
            {
                platform = (num == 6 || num == 9 ? RegistryTools.Platform.X64 : RegistryTools.Platform.Unknown);
            }
            return(platform);
        }
Ejemplo n.º 2
0
 internal static extern void GetSystemInfo(ref RegistryTools.SYSTEM_INFO system_INFO_0);