• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Object HANDLEs</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="../../../boost_asio.html" title="Boost.Asio">
8<link rel="up" href="../windows.html" title="Windows-Specific Functionality">
9<link rel="prev" href="random_access_handle.html" title="Random-Access HANDLEs">
10<link rel="next" href="../ssl.html" title="SSL">
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="random_access_handle.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../windows.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../ssl.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="boost_asio.overview.windows.object_handle"></a><a class="link" href="object_handle.html" title="Object HANDLEs">Object HANDLEs</a>
28</h4></div></div></div>
29<p>
30          Boost.Asio provides Windows-specific classes that permit asynchronous wait
31          operations to be performed on HANDLEs to kernel objects of the following
32          types:
33        </p>
34<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
35<li class="listitem">
36              Change notification
37            </li>
38<li class="listitem">
39              Console input
40            </li>
41<li class="listitem">
42              Event
43            </li>
44<li class="listitem">
45              Memory resource notification
46            </li>
47<li class="listitem">
48              Process
49            </li>
50<li class="listitem">
51              Semaphore
52            </li>
53<li class="listitem">
54              Thread
55            </li>
56<li class="listitem">
57              Waitable timer
58            </li>
59</ul></div>
60<p>
61          For example, to perform asynchronous operations on an event, the following
62          object may be created:
63        </p>
64<pre class="programlisting">HANDLE handle = ::CreateEvent(...);
65windows::object_handle file(my_io_context, handle);
66</pre>
67<p>
68          The <code class="computeroutput">wait()</code> and <code class="computeroutput">async_wait()</code> member functions
69          may then be used to wait until the kernel object is signalled.
70        </p>
71<h6>
72<a name="boost_asio.overview.windows.object_handle.h0"></a>
73          <span class="phrase"><a name="boost_asio.overview.windows.object_handle.see_also"></a></span><a class="link" href="object_handle.html#boost_asio.overview.windows.object_handle.see_also">See Also</a>
74        </h6>
75<p>
76          <a class="link" href="../../reference/windows__object_handle.html" title="windows::object_handle">windows::object_handle</a>.
77        </p>
78<h6>
79<a name="boost_asio.overview.windows.object_handle.h1"></a>
80          <span class="phrase"><a name="boost_asio.overview.windows.object_handle.notes"></a></span><a class="link" href="object_handle.html#boost_asio.overview.windows.object_handle.notes">Notes</a>
81        </h6>
82<p>
83          Windows object <code class="computeroutput">HANDLE</code>s are only available at compile time
84          when targeting Windows. Programs may test for the macro <code class="computeroutput">BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE</code>
85          to determine whether they are supported.
86        </p>
87</div>
88<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
89<td align="left"></td>
90<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M.
91      Kohlhoff<p>
92        Distributed under the Boost Software License, Version 1.0. (See accompanying
93        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
94      </p>
95</div></td>
96</tr></table>
97<hr>
98<div class="spirit-nav">
99<a accesskey="p" href="random_access_handle.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../windows.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../ssl.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
100</div>
101</body>
102</html>
103