【问题标题】:How to detect Windows XP or Windows 2000 OS to run a CVI executable如何检测 Windows XP 或 Windows 2000 操作系统以运行 CVI 可执行文件
【发布时间】:2009-12-07 19:53:54
【问题描述】:

我正在使用 NI LabWindows CVI 8.1 编译和构建我需要在 Windows XP 和 Windows 2000 操作系统上运行的可执行程序。我使用 Windows XP 编译和构建可执行文件。到目前为止,我得到的信息是我需要如下声明:

#ifdef (windows xp)
//then specify path as C:\WINDOWS\system32
#elif (windows NT)
//then specify path as C:\WINNT\system32
#endif

我需要知道确切的语法是什么以及放在哪里(比如放置哪个头文件或源文件)。

【问题讨论】:

  • XP 的系统路径可以是 C:\winnt(我认为是从 Win2k 升级的默认情况。)并且 C: 可能不是系统驱动器。疯狂的用户可能会将 Windows 重定向到其他地方。

标签: compiler-construction cvi labwindows


【解决方案1】:

【讨论】:

  • 确实——不要硬编码C: 任何东西!我没有一个带有默认目录的系统。比如最常用的系统有系统目录E:\WINNT55SP2\SYS32
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-08-13
相关资源
最近更新 更多