Windows Mobile 6.5.3 预处理器
是否有一个预处理器值可以用来检测程序何时针对 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 构建配置。
Is there a preprocessor value I can use to detect when the program is being compiled for Windows Mobile 6.5.3? For example, I can use #if (_WIN32_WCE >= 0x501)
to compile the code for Windows Mobile 5 and later, or #if _WIN32_WCE >= 0x502
to compile the code for Windows Mobile 6.
There are some new API that exist in Windows Mobile 6.5.3 that do not exist in Windows Mobile 6. I would like to make sure the WM 6.5.3 calls are not being compiled into the WM 6, WM 5, and Pocket PC 2003 build configurations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(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 版本,而且这样做并不是很简单。
The version refers to the Windows CE version, which I don't believe matches the Windows Mobile version.
From what I recall, this version define is in the form of 0xXYZ where X is the major version, Y is the minor version, and Z is the revision. So if 0x502 refers to Windows Mobile 6 or later, it would mean Windows Mobile 6 runs on Windows CE 5.0.2.
You'll need to figure out which version of Windows CE is used by Windows Mobile 6.5.3, if it uses a different version, and compare the define to that. If it doesn't use a different version of Windows CE (and I think this is the case), I think you're out of luck.
I don't think there's any sort of preprocessor to target specific versions of Windows Mobile, so you'd have to make two separate builds and use your own define. As far as I know, you can only get the Windows Mobile version at runtime, and doing so isn't very straight forward.