1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Configuration</title> 5<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../index.html" title="Chapter 1. Boost.WinAPI"> 8<link rel="up" href="../index.html" title="Chapter 1. Boost.WinAPI"> 9<link rel="prev" href="../index.html" title="Chapter 1. Boost.WinAPI"> 10<link rel="next" href="usage.html" title="Using Boost.WinAPI"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="usage.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 27<a name="winapi.config"></a><a class="link" href="config.html" title="Configuration">Configuration</a> 28</h2></div></div></div> 29<p> 30 Boost.WinAPI recognizes the following configuration macros: 31 </p> 32<div class="table"> 33<a name="winapi.config.configuration_macros"></a><p class="title"><b>Table 1.1. Configuration macros</b></p> 34<div class="table-contents"><table class="table" summary="Configuration macros"> 35<colgroup> 36<col> 37<col> 38</colgroup> 39<thead><tr> 40<th> 41 <p> 42 Macro name 43 </p> 44 </th> 45<th> 46 <p> 47 Effect 48 </p> 49 </th> 50</tr></thead> 51<tbody> 52<tr> 53<td> 54 <p> 55 <code class="computeroutput"><span class="identifier">BOOST_USE_WINAPI_VERSION</span></code> 56 </p> 57 </td> 58<td> 59 <p> 60 If defined, designates the target Windows API version. The version 61 should be given as hexadecimal integer, same as the <code class="computeroutput"><span class="identifier">_WIN32_WINNT</span></code> macro values. Some 62 of the versions are given <a href="https://msdn.microsoft.com/en-us/library/aa383745(v=vs.100).aspx#macros_for_conditional_declarations" target="_top">here</a>. 63 If the macro is not defined, the version is deduced from <code class="computeroutput"><span class="identifier">_WIN32_WINNT</span></code> and <code class="computeroutput"><span class="identifier">WINVER</span></code> macros, if they are defined, 64 or the default version is chosen. The default version is currently 65 Windows Vista/Server 2008 on compilers that support this version 66 of SDK and Windows XP on others. The default may change in future 67 releases. 68 </p> 69 </td> 70</tr> 71<tr> 72<td> 73 <p> 74 <code class="computeroutput"><span class="identifier">BOOST_USE_NTDDI_VERSION</span></code> 75 </p> 76 </td> 77<td> 78 <p> 79 If defined, designates the target Windows API version down to a particular 80 Service Pack. This macro offers a more fine grained way to define 81 the target Windows version than <code class="computeroutput"><span class="identifier">BOOST_USE_WINAPI_VERSION</span></code>. 82 The version should be given as hexadecimal integer, same as the 83 <code class="computeroutput"><span class="identifier">NTDDI_VERSION</span></code> macro 84 values. Some of the versions are given <a href="https://msdn.microsoft.com/en-us/library/aa383745(v=vs.100).aspx#macros_for_conditional_declarations" target="_top">here</a>. 85 If the macro is not defined, the version is deduced from <code class="computeroutput"><span class="identifier">NTDDI_VERSION</span></code> and <code class="computeroutput"><span class="identifier">BOOST_USE_WINAPI_VERSION</span></code> macros, 86 in the latter case defaulting to the latest revision of the indicated 87 Windows version. If <code class="computeroutput"><span class="identifier">BOOST_USE_NTDDI_VERSION</span></code> 88 is defined, <code class="computeroutput"><span class="identifier">BOOST_USE_WINAPI_VERSION</span></code> 89 is also expected to be defined to a corresponding value. 90 </p> 91 </td> 92</tr> 93<tr> 94<td> 95 <p> 96 <code class="computeroutput"><span class="identifier">BOOST_USE_WINAPI_FAMILY</span></code> 97 </p> 98 </td> 99<td> 100 <p> 101 If defined, designates the Windows API family to use. The family 102 can be set to one of the values of the <code class="computeroutput"><span class="identifier">WINAPI_FAMILY</span></code>. 103 </p> 104 </td> 105</tr> 106<tr> 107<td> 108 <p> 109 <code class="computeroutput"><span class="identifier">BOOST_USE_WINDOWS_H</span></code> 110 </p> 111 </td> 112<td> 113 <p> 114 This macro is part of Boost.Config. If defined, Boost.WinAPI will 115 include <code class="computeroutput"><span class="special"><</span><span class="identifier">windows</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code> and any other headers from Windows 116 SDK as needed. Otherwise Boost.WinAPI will provide its own declarations 117 of the SDK components as needed without including SDK headers. 118 </p> 119 </td> 120</tr> 121<tr> 122<td> 123 <p> 124 <code class="computeroutput"><span class="identifier">BOOST_NO_ANSI_APIS</span></code> 125 </p> 126 </td> 127<td> 128 <p> 129 This macro is defined by Boost.Config on platforms that do not support 130 narrow-character versions of some APIs. Boost.WinAPI will not declare 131 narrow-character APIs when this macro is defined. 132 </p> 133 </td> 134</tr> 135</tbody> 136</table></div> 137</div> 138<br class="table-break"><p> 139 User's code can include <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">winapi</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> to define a number of macros that can be 140 useful. Including this header is recommended in any code that involves Windows 141 API usage. 142 </p> 143<div class="table"> 144<a name="winapi.config.defined_configuration_macros"></a><p class="title"><b>Table 1.2. Defined configuration macros</b></p> 145<div class="table-contents"><table class="table" summary="Defined configuration macros"> 146<colgroup> 147<col> 148<col> 149</colgroup> 150<thead><tr> 151<th> 152 <p> 153 Macro name 154 </p> 155 </th> 156<th> 157 <p> 158 Effect 159 </p> 160 </th> 161</tr></thead> 162<tbody> 163<tr> 164<td> 165 <p> 166 <code class="computeroutput"><span class="identifier">BOOST_USE_WINAPI_VERSION</span></code>,<br> 167 <code class="computeroutput"><span class="identifier">BOOST_USE_NTDDI_VERSION</span></code> 168 </p> 169 </td> 170<td> 171 <p> 172 If not defined by user, these macros are defined by the header to 173 the target Windows API version. 174 </p> 175 </td> 176</tr> 177<tr> 178<td> 179 <p> 180 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_NT4</span></code>,<br> 181 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WIN2K</span></code>,<br> 182 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WINXP</span></code>,<br> 183 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WS03</span></code>,<br> 184 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WIN6</span></code>,<br> 185 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_VISTA</span></code>,<br> 186 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WS08</span></code>,<br> 187 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_LONGHORN</span></code>,<br> 188 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WIN7</span></code>,<br> 189 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WIN8</span></code>,<br> 190 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WINBLUE</span></code>,<br> 191 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WINTHRESHOLD</span></code>,<br> 192 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_VERSION_WIN10</span></code> 193 </p> 194 </td> 195<td> 196 <p> 197 These macros expand to the constants designating the particular Windows 198 versions and can be used together with <code class="computeroutput"><span class="identifier">BOOST_USE_WINAPI_VERSION</span></code> 199 in preprocessor version checks. 200 </p> 201 </td> 202</tr> 203<tr> 204<td> 205 <p> 206 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_IS_MINGW</span></code> 207 </p> 208 </td> 209<td> 210 <p> 211 Defined if Windows SDK is provided by <a href="http://mingw.org/" target="_top">MinGW</a>. 212 </p> 213 </td> 214</tr> 215<tr> 216<td> 217 <p> 218 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_IS_MINGW_W64</span></code> 219 </p> 220 </td> 221<td> 222 <p> 223 Defined if Windows SDK is provided by <a href="http://mingw-w64.org" target="_top">MinGW-w64</a>. 224 Note that is does not mean that the code is compiled for 64-bit Windows. 225 </p> 226 </td> 227</tr> 228<tr> 229<td> 230 <p> 231 <code class="computeroutput"><span class="identifier">BOOST_WINAPI_IS_CYGWIN</span></code> 232 </p> 233 </td> 234<td> 235 <p> 236 Defined if Windows SDK is provided by MinGW variant from <a href="https://cygwin.com/" target="_top">Cygwin</a>. 237 </p> 238 </td> 239</tr> 240</tbody> 241</table></div> 242</div> 243<br class="table-break"> 244</div> 245<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 246<td align="left"></td> 247<td align="right"><div class="copyright-footer">Copyright © 2016-2018 Andrey Semashev<p> 248 Distributed under the <a href="http://boost.org/LICENSE_1_0.txt" target="_top">Boost 249 Software License, Version 1.0</a>. 250 </p> 251</div></td> 252</tr></table> 253<hr> 254<div class="spirit-nav"> 255<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="usage.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 256</div> 257</body> 258</html> 259