예제 #1
0
        /// <summary>
        /// Determines the current processor's architecture.
        /// </summary>
        /// <returns>A string representing the architecture name</returns>
        private static string DetermineArchitecture()
        {
            ProcessorInfo.SystemInfo sysInfo = new ProcessorInfo.SystemInfo();
            ProcessorInfo.GetSystemInfo(ref sysInfo);

            switch (sysInfo.uProcessorInfo.wProcessorArchitecture)
            {
            case (ushort)ProcessorInfo.ProcessorArchitecture.Intel:
                return("Intel");

            case (ushort)ProcessorInfo.ProcessorArchitecture.IA64:
                return("Itanium (IA64)");

            case (ushort)ProcessorInfo.ProcessorArchitecture.AMD64:
                return("AMD64");

            default:
                return("Unknown");
            }
        }
예제 #2
0
파일: Processor.cs 프로젝트: HaKDMoDz/eStd
        /// <summary>
        /// Determines the current processor's architecture.
        /// </summary>
        /// <returns>A string representing the architecture name</returns>
        private static string DetermineArchitecture()
        {
            ProcessorInfo.SystemInfo sysInfo = new ProcessorInfo.SystemInfo();
            ProcessorInfo.GetSystemInfo(ref sysInfo);

            switch (sysInfo.uProcessorInfo.wProcessorArchitecture)
            {
                case (ushort) ProcessorInfo.ProcessorArchitecture.Intel:
                    return "Intel";

                case (ushort) ProcessorInfo.ProcessorArchitecture.IA64:
                    return "Itanium (IA64)";

                case (ushort) ProcessorInfo.ProcessorArchitecture.AMD64:
                    return "AMD64";

                default:
                    return "Unknown";
            }
        }