【问题标题】:Windows Mobile 6.5.3 preprocessorWindows Mobile 6.5.3 预处理器
【发布时间】:2010-08-04 18:15:44
【问题描述】:

是否有可用于检测程序何时为 Windows Mobile 6.5.3 编译的预处理器值?例如,我可以使用#if (_WIN32_WCE >= 0x501) 编译 Windows Mobile 5 及更高版本的代码,或使用#if _WIN32_WCE >= 0x502 编译 Windows Mobile 6 的代码。

Windows Mobile 6.5.3 中存在一些在 Windows Mobile 6 中不存在的新 API。我想确保不会将 WM 6.5.3 调用编译到 WM 6、WM 5 和Pocket PC 2003 构建配置。

【问题讨论】:

    标签: c++ windows-mobile c-preprocessor


    【解决方案1】:

    版本指的是 Windows CE 版本,我认为它与 Windows Mobile 版本不匹配。

    据我回忆,这个版本定义的形式是 0xXYZ,其中 X 是主要版本,Y 是次要版本,Z 是修订版。因此,如果 0x502 指的是 Windows Mobile 6 或更高版本,则意味着 Windows Mobile 6 在 Windows CE 5.0.2 上运行。

    您需要确定 Windows Mobile 6.5.3 使用的是哪个版本的 Windows CE(如果它使用不同的版本),并将定义与该版本进行比较。如果它不使用不同版本的 Windows CE(我认为是这种情况),我认为你不走运。

    我认为没有任何类型的预处理器可以针对特定版本的 Windows Mobile,因此您必须进行两个单独的构建并使用您自己的定义。据我所知,您只能在运行时获取 Windows Mobile 版本,这样做并不是很简单。

    【讨论】:

      猜你喜欢
      • 2011-08-11
      • 1970-01-01
      • 1970-01-01
      • 2012-05-12
      • 2012-09-29
      • 2015-10-20
      • 1970-01-01
      • 2011-03-05
      • 2014-08-09
      相关资源
      最近更新 更多