1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Chapter 1. Boost.WinAPI</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="next" href="winapi/config.html" title="Configuration"> 9</head> 10<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 11<table cellpadding="2" width="100%"><tr> 12<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 13<td align="center"><a href="../../../../index.html">Home</a></td> 14<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 15<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 16<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 17<td align="center"><a href="../../../../more/index.htm">More</a></td> 18</tr></table> 19<hr> 20<div class="spirit-nav"><a accesskey="n" href="winapi/config.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div> 21<div class="chapter"> 22<div class="titlepage"><div> 23<div><h2 class="title"> 24<a name="winapi"></a>Chapter 1. Boost.WinAPI</h2></div> 25<div><p class="copyright">Copyright © 2016-2018 Andrey Semashev</p></div> 26<div><div class="legalnotice"> 27<a name="winapi.legal"></a><p> 28 Distributed under the <a href="http://boost.org/LICENSE_1_0.txt" target="_top">Boost 29 Software License, Version 1.0</a>. 30 </p> 31</div></div> 32</div></div> 33<div class="toc"> 34<p><b>Table of Contents</b></p> 35<dl class="toc"> 36<dt><span class="section"><a href="index.html#winapi.intro">Introduction</a></span></dt> 37<dt><span class="section"><a href="winapi/config.html">Configuration</a></span></dt> 38<dt><span class="section"><a href="winapi/usage.html">Using Boost.WinAPI</a></span></dt> 39</dl> 40</div> 41<div class="section"> 42<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 43<a name="winapi.intro"></a><a class="link" href="index.html#winapi.intro" title="Introduction">Introduction</a> 44</h2></div></div></div> 45<p> 46 The Boost.WinAPI library is an abstraction layer for Windows API intended to 47 be used internally by other Boost libraries. Boost.WinAPI is not a public library 48 for users of Boost. 49 </p> 50<p> 51 The main advantages of using Boost.WinAPI instead of Windows API directly are: 52 </p> 53<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 54<li class="listitem"> 55 Avoid including <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> 56 or other Windows SDK headers in public headers of your library. Windows 57 SDK headers are known to be dependent on a large number of configuration 58 macros that have to be defined by the user. If your library depends on 59 a particular API, you may not be able to rely on it being enabled by the 60 user. On the other hand, your library cannot enforce particular Windows 61 SDK configuration because (a) Windows SDK headers may be included before 62 your library headers with a different set of config macros and (b) because 63 your desired configuration may be incompatible with that of the user's 64 code. 65 </li> 66<li class="listitem"> 67 Avoid dealing with lots of macros defined by Windows SDK headers. 68 </li> 69<li class="listitem"> 70 More fine grained control of the API you include in your headers. 71 </li> 72<li class="listitem"> 73 Allow to select the target Windows version for Boost. This version can 74 be different from the version user's code targets. 75 </li> 76<li class="listitem"> 77 Better compatibility with different implementations of Windows SDK, like 78 MinGW and MinGW-w64. 79 </li> 80</ul></div> 81<p> 82 The implementation of Boost.WinAPI consists of a number of declarations of 83 functions, types and constants mimicking the real declarations in Windows SDK. 84 In some cases simple inline function wrappers are provided. As a result the 85 runtime performance impact of Boost.WinAPI should be zero. Boost.WinAPI only 86 depends on Boost.Config and Boost.Predef and is compatible with C++03 compilers. 87 </p> 88</div> 89</div> 90<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 91<td align="left"><p><small>Last revised: August 11, 2020 at 14:59:06 GMT</small></p></td> 92<td align="right"><div class="copyright-footer"></div></td> 93</tr></table> 94<hr> 95<div class="spirit-nav"><a accesskey="n" href="winapi/config.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div> 96</body> 97</html> 98