检测的WinRT和Windows之间的区别8 [英] Detect the difference between WinRT and Windows 8
问题描述
有关统计跟踪,我希望能够告诉如果应用程序在Windows RT或Windows Pro的运行。
For statistic tracking, I'd like to be able to tell if the application is running on Windows RT or Windows Pro.
这线程说,有没有办法获取系统版本信息:
This thread says that there's no way to get the system version info:
任何想法?
推荐答案
有一件事情你可以做的就是去配置管理器在Visual Studio和而不是默认的任何CPU配置 - 创建单独的ARM /在x86 / x64配置和项目属性/条件编译符号定义一个符号,是ARM与在x86 / x64配置不同。然后,你可以使用#如果#else伪的#endif预处理指令只是测试它在你的代码。
One thing you could do is to go to Configuration Manager in Visual Studio and instead of the default Any CPU configuration - create separate ARM/x86/x64 configurations and in project properties/Conditional compilation symbols define a symbol that is different for ARM vs. x86/x64 configurations. Then you can just test for it in your code using #if #else #endif preprocessor directives.
这篇关于检测的WinRT和Windows之间的区别8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!