• windows.h


    今天给大家讲解c++里的

    #include
    
    • 1

    头文件

    Win32程序的开头都可看到:

    #include 
    
    • 1

    文件路径 Windows 64位系统:

    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include[Windows 7 SDK]
    C:\Program Files (x86)\Windows Kits\8.0\Include\um [Windows 8 SDK]
    C:\Program Files (x86)\Windows Kits\8.1\Include\um [Windows 8.1 SDK]
    
    • 1
    • 2
    • 3

    文件内容:

    /**
     * @file windows.h
     * Copyright 2012, 2013 MinGW.org project
     *
     * Permission is hereby granted, free of charge, to any person obtaining a
     * copy of this software and associated documentation files (the "Software"),
     * to deal in the Software without restriction, including without limitation
     * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     * and/or sell copies of the Software, and to permit persons to whom the
     * Software is furnished to do so, subject to the following conditions:
     * 
     * The above copyright notice and this permission notice (including the next
     * paragraph) shall be included in all copies or substantial portions of the
     * Software.
     * 
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
     * DEALINGS IN THE SOFTWARE.
     */
    /* Written by Anders Norlander  */
    #ifndef _WINDOWS_H
    #define _WINDOWS_H
    #pragma GCC system_header
    #include <_mingw.h>
     
    /* translate GCC target defines to MS equivalents. Keep this synchronized
       with winnt.h. */
    #if defined(__i686__) && !defined(_M_IX86)
    #define _M_IX86 600
    #elif defined(__i586__) && !defined(_M_IX86)
    #define _M_IX86 500
    #elif defined(__i486__) && !defined(_M_IX86)
    #define _M_IX86 400
    #elif defined(__i386__) && !defined(_M_IX86)
    #define _M_IX86 300
    #endif
     
    #if defined(_M_IX86) && !defined(_X86_)
    #define _X86_
    #elif defined(_M_ALPHA) && !defined(_ALPHA_)
    #define _ALPHA_
    #elif defined(_M_PPC) && !defined(_PPC_)
    #define _PPC_
    #elif defined(_M_MRX000) && !defined(_MIPS_)
    #define _MIPS_
    #elif defined(_M_M68K) && !defined(_68K_)
    #define _68K_
    #endif
     
    #ifdef RC_INVOKED
    /* winresrc.h includes the necessary headers */
    #include 
    #else
     
    #include 
    #include 
    #include 
    #include 
    #ifndef NOGDI
    #include 
    #endif
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
     
    #ifndef WIN32_LEAN_AND_MEAN
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
     
    #ifndef NOGDI
    #include 
    #include 
    #endif
     
    /* __USE_W32_SOCKETS is a __CYGWIN__ guard */
    #if defined(__USE_W32_SOCKETS) || !(defined(__CYGWIN__) || defined(__MSYS__))
    #include 
    #endif
     
    #ifndef NOGDI
    /* In older versions we disallowed COM declarations in __OBJC__
       because of conflicts with @interface directive.  Define _OBJC_NO_COM
       to keep this behaviour.  */ 
    #if !defined (_OBJC_NO_COM) 
    #include 
    #endif /* _OBJC_NO_COM */
    #endif
     
    #endif /* WIN32_LEAN_AND_MEAN */
     
    #endif /* RC_INVOKED */
     
    #ifdef __OBJC__
    /* FIXME: Not undefining BOOL here causes all BOOLs to be WINBOOL (int),
       but undefining it causes trouble as well if a file is included after
       windows.h
    */
    #undef BOOL
    #endif
     
    #endif
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
  • 相关阅读:
    PlayWright(二十二)- allure插件(一)
    python中datetime和time的区别,我学了一周整理的
    详解WebSocket
    入门级 Python变量类型和运算符知识点整理
    Unreal 输入系统 解析
    使用云服务器作为跳板机器远程转发内网机器端口的jupyter服务
    SpringBoot使用Mybatis查询数据
    [论文分享] IR2Vec: LLVM IR Based Scalable Program Embeddings
    【k8s】ingress-nginx通过header路由到不同后端
    Python入门-变量定义与切片&Python引入包和引入模块
  • 原文地址:https://blog.csdn.net/m0_71905144/article/details/126316635