예제 #1
0
        private static Platform GetPlatform()
        {
            VERSION.SYSTEM_INFO sYSTEM_INFO = default(VERSION.SYSTEM_INFO);
            VERSION.GetNativeSystemInfo(ref sYSTEM_INFO);
            ushort   wProcessorArchitecture = sYSTEM_INFO.wProcessorArchitecture;
            Platform result;

            if (wProcessorArchitecture != 0)
            {
                if (wProcessorArchitecture != 9)
                {
                    result = Platform.Unknown;
                }
                else
                {
                    result = Platform.X64;
                }
            }
            else
            {
                result = Platform.X86;
            }
            return(result);
        }
예제 #2
0
 internal static extern void GetNativeSystemInfo(ref VERSION.SYSTEM_INFO lpSystemInfo);