在使用一些新版本的API,或者控件的新特性(比如新版的ComCtl32.dll)的时候,你可能会得到“error C2065: undeclared identifier.“这个错误。原因是这些功能是依赖于你的操作系统的版本的。而你的头文件中的定义并不是最新的。(对于MFC,就是stdafx.h)下面详细列举了每个Windows版本对应的NTDDI_VERSION,_WIN32_WINNT,WINVER,_WIN32_IE这些宏。

The following table describes the preferred macros in use by the Windows header files.

Minimum system required                Macros to define 
Windows Server 2008                     NTDDI_VERSION >= NTDDI_LONGHORN 
Windows Vista                                NTDDI_VERSION >= NTDDI_VISTA 
Windows Server 2003 SP1                 NTDDI_VERSION >= NTDDI_WS03SP1 
Windows Server 2003                     NTDDI_VERSION >= NTDDI_WS03 
Windows XP SP2                          NTDDI_VERSION >= NTDDI_WINXPSP2 
Windows XP SP1                          NTDDI_VERSION >= NTDDI_WINXPSP1 
Windows XP                                  NTDDI_VERSION >= NTDDI_WINXP 
Windows 2000 SP4                        NTDDI_VERSION >= NTDDI_WIN2KSP4 
Windows 2000 SP3                        NTDDI_VERSION >= NTDDI_WIN2KSP3 
Windows 2000 SP2                        NTDDI_VERSION >= NTDDI_WIN2KSP2 
Windows 2000 SP1                        NTDDI_VERSION >= NTDDI_WIN2KSP1 
Windows 2000                                NTDDI_VERSION >= NTDDI_WIN2K

The following table describes the legacy macros in use by the Windows header files.

Minimum system required                 Macros to define 
Windows Server 2008                      _WIN32_WINNT>=0x0600
                                                         WINVER>=0x0600
 
Windows Vista                            _WIN32_WINNT>=0x0600
                                                     WINVER>=0x0600
 
Windows Server 2003                      _WIN32_WINNT>=0x0502
                                                          WINVER>=0x0502
 
Windows XP                               _WIN32_WINNT>=0x0501
                                                       WINVER>=0x0501
 
Windows 2000                             _WIN32_WINNT>=0x0500
                                                      WINVER>=0x0500
 
Windows NT 4.0                           _WIN32_WINNT>=0x0400
                                                       WINVER>=0x0400
 
Windows Me                               _WIN32_WINDOWS=0x0500
                                                       WINVER>=0x0500
 
Windows 98                               _WIN32_WINDOWS>=0x0410
                                                   WINVER>=0x0410
 
Windows 95                               _WIN32_WINDOWS>=0x0400
                                                    WINVER>=0x0400
 
Internet Explorer 7.0                        _WIN32_IE>=0x0700 
Internet Explorer 6.0 SP2                 _WIN32_IE>=0x0603 
Internet Explorer 6.0 SP1                 _WIN32_IE>=0x0601 
Internet Explorer 6.0                        _WIN32_IE>=0x0600 
Internet Explorer 5.5                         _WIN32_IE>=0x0550 
Internet Explorer 5.01                        _WIN32_IE>=0x0501 
Internet Explorer 5.0, 5.0a, 5.0b          _WIN32_IE>=0x0500 
Internet Explorer 4.01                       _WIN32_IE>=0x0401 
Internet Explorer 4.0                          _WIN32_IE>=0x0400 
Internet Explorer 3.0, 3.01, 3.02        _WIN32_IE>=0x0300

关于_WIN32_WINNT的含义的更多相关文章

  1. 由css reset想到的深入理解margin及em的含义

    由css reset想到的深入理解margin及em的含义 原文地址:http://www.ymblog.net/content_189.html 经常看到这样语句,*{ margin:0px;pad ...

  2. Stack的三种含义

    作者: 阮一峰 日期: 2013年11月29日 学习编程的时候,经常会看到stack这个词,它的中文名字叫做"栈". 理解这个概念,对于理解程序的运行至关重要.容易混淆的是,这个词 ...

  3. wireshark抓包工具简介以及tcp三次握手的一些含义

    wireshark是非常流行的网络封包分析软件,功能十分强大.可以截取各种网络封包,显示网络封包的详细信息.使用wireshark的人必须了解网络协议,否则就看不懂wireshark了.为了安全考虑, ...

  4. PV、EV、AC、BAC、EAC、ETC等计算公式含义

    PV.EV.AC.BAC.EAC.ETC等计算公式含义 PV Planned Value:计划值 应该完成多少工作, (按照计划截止目前应该花费的预算) AC Actual Cost:实际成本, 完成 ...

  5. _WIN32_WINNT not defined. Defaulting to _WIN32_WINNT_MAXVER (see WinSDKVer.h)

    原文地址::http://blog.csdn.net/xiaolongwang2010/article/details/7550505 相关网帖 1.错误找不到WinsdkVer.h----http: ...

  6. [MySQL]show index from tb_name命令各列的含义

    show index from table_name 这个命令有助于诊断性能低下的查询,尤其是查询是否使用了可用的索引. 下面介绍下 这个命令显示的结果列的含义: | Table | Non_uniq ...

  7. CPU状态信息us,sy,ni,id,wa,hi,si,st含义

    转自:http://blog.csdn.net/sasoritattoo/article/details/9318893 转自:http://fishermen.iteye.com/blog/1995 ...

  8. http错误代码含义中英文对照

    Http错误代码含义中文 概要当用户试图通过 HTTP 或文件传输协议 (FTP) 访问一台正在运行 Internet 信息服务 (IIS) 的服务器上的内容时,IIS 返回一个表示该请求的状态的数字 ...

  9. linux中shell变量$#,$@,$0,$1,$2的含义解释

    linux中shell变量$#,$@,$0,$1,$2的含义解释: 变量说明: $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行 ...

随机推荐

  1. Duilib嵌入CEF禁止浏览器响应拖拽事件

    转载:http://blog.csdn.net/liuyan20092009/article/details/53819473 转载:https://blog.csdn.net/u012778714( ...

  2. 在Github上搭建博客

    貌似还是这个链接最靠谱呀 http://my.oschina.net/nark/blog/116299   如何利用github建立个人博客:之一 在线编辑器http://markable.in/ed ...

  3. 山东省第四届ACM程序设计竞赛部分题解

    A : Rescue The Princess 题意: 给你平面上的两个点A,B,求点C使得A,B,C逆时针成等边三角形. 思路: http://www.cnblogs.com/E-star/arch ...

  4. TCP协议和UDP协议区别

    tcp协议:可靠的.面向连接的协议(eg:打电话).传输效率低全双工通信(发送缓存&接收缓存).面向字节流.使用TCP的应用:Web浏览器:文件传输程序 udp协议:不可靠的.无连接的服务,传 ...

  5. git报错:src refspec master does not match any

    问题出现:git推送本地内容到远程仓库时,报错src refspec master does not match any. 1.我的流程: mkdir project_k命令,新建本地仓库. cd p ...

  6. 简单的spring mvc实例

    简单的springmvc实例 pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=&qu ...

  7. supervisor进程管理工具

    Supervisor 一个python写的进程管理工具,用来启动.关闭.重启进程,可以同时控制多个进程. 安装: pip install supervisor 配置: 通过配置文件来满足自己的需求 配 ...

  8. Appium 自动化测试(3)--Appium框架与流程介绍

    Appium介绍 Appium是一个移动端的自动化框架,可用于测试原生应用,移动网页应用和混合型应用,且是跨平台的.可用于IOS和Android以及firefox的操作系统.原生的应用是指用andro ...

  9. [转载]LeetCode: Gray Code

    The gray code is a binary numeral system where two successive values differ in only one bit. Given a ...

  10. 007——php字符串中的处理函数(六)

    <?php /** * 一.addslashes() 在预定义字符串前添加反斜杠 * * stripslashes() 把转义字符串前的反斜杠删除 * get_magic_quotes_gpc ...