WIN32和_WIN32的区别
来源:互联网 发布:网络许可 英文 编辑:程序博客网 时间:2024/05/29 04:47
WIN32 is a name that you could use and even define in your own code and so might clash with Microsoft’s usage._WIN32 is a name that is reserved for the implementor (tn this case MS) because it begins with an underscore and an uppercase letter - you are not allowed to define reserved names in your own code, so there can be no clash.
WIN32 is defined by the SDK or the build environment, so it does not use the implementation reserved namespace
_WIN32 is defined by the compiler so it uses the underscore to place it in the implementation-reserved namespace
You’ll find a similar set of dual defines with nearly identical names and similar uses such as _UNICODE/UNICODE, _DEBUG/DEBUG, or maybe _DLL/DLL (I think that only the UNICODE ones get much of any use in their different versions). Though sometimes in these cases (like _UNICODE), instead of the underscore version being defined by the compiler, they are used to control what the CRT headers do:
_UNICODE tells the CRT headers that CRT names which can be either Unicode or ANSI (such as _tcslen() should map to the wide character variant (wcslen())
UNICODE does something similar for the SDK (maps Win32 APIs to their “W” variants)
参见:http://stackoverflow.com/questions/662084/whats-the-difference-between-the-win32-and-win32-defines-in-c
- WIN32和_WIN32的区别
- WIN32和_WIN32的区别
- 预定义常量_WIN32,WIN32,_WIN64的区别
- WIN32 _WIN32 _WIN64
- 有关WIN32,_WIN32,_WIN64的几项说明
- VC_概念_WIN32/API/SDK/MFC四者之间的联系和区别
- MFC和Win32的区别
- .net和win32的区别
- 关于VC预定义常量_WIN32,WIN32,_WIN64等预定义宏的介绍(整理、转载)
- Win32 Application和Win32 Console Application的区别
- win32 application 和win32 console application 的区别
- win32 application 和 win32 console application的区别
- Win32 application 和 Win32 Console application的区别
- Win32 Application和Win32 Console Application 的区别(转)
- win32和win32 console的区别(转帖)
- Win32 Application和Win32 Console Application的区别
- Win32控制台应用程序和Win32项目的区别
- 【转】win32 application 和win32 console application 的区别
- jquery ocupload一键上传文件应用
- iOS 屏幕旋转常用方式
- GitHub在linux中的配置SSH
- 原生ajax发送post请求
- python的setattr,getattr,hasattr
- WIN32和_WIN32的区别
- win7下简单FTP服务器搭建
- ADB常用命令
- Kotlin 第十三章:嵌套类、枚举类
- java作业
- Android Studio:依赖包的版本号大全
- sonar平台页面简单介绍
- 使用JAVA实现的一个简单IOC注入实例
- MacOS 开发