【发布时间】:2015-01-05 22:27:57
【问题描述】:
在我的应用程序中,我需要检查 Windows 版本。我在Visual Studio 2013 (v120) platform toolset 中使用Version Helper functions。但随后该程序无法在 Windows XP 中运行。错误是:
'xxx.exe' is not a valid win32 application
所以我将平台工具集更改为Visual Studio 2013 - Windows XP (v120_xp)。但在这种情况下,应用程序将无法编译。
错误是:
error C1083: Cannot open include file: 'VersionHelpers.h': No such file or directory
我能做什么?我可以使用旧的GetVersionEx 功能吗? MSDN 说:
GetVersionEx may be altered or unavailable for releases after Windows 8.1. Instead, use the Version Helper APIs
但也许我现在应该使用它!
【问题讨论】:
标签: c++ visual-c++ visual-studio-2013 windows-xp