Imported Upstream version 1.49.0
[platform/upstream/boost.git] / doc / html / boost_asio / overview / windows / object_handle.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
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.76.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" 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"><span class="identifier">HANDLE</span> <span class="identifier">handle</span> <span class="special">=</span> <span class="special">::</span><span class="identifier">CreateEvent</span><span class="special">(...);</span>
65 <span class="identifier">windows</span><span class="special">::</span><span class="identifier">object_handle</span> <span class="identifier">file</span><span class="special">(</span><span class="identifier">my_io_service</span><span class="special">,</span> <span class="identifier">handle</span><span class="special">);</span>
66 </pre>
67 <p>
68           The <code class="computeroutput"><span class="identifier">wait</span><span class="special">()</span></code>
69           and <code class="computeroutput"><span class="identifier">async_wait</span><span class="special">()</span></code>
70           member functions may then be used to wait until the kernel object is signalled.
71         </p>
72 <h6>
73 <a name="boost_asio.overview.windows.object_handle.h0"></a>
74           <span><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>
75         </h6>
76 <p>
77           <a class="link" href="../../reference/windows__object_handle.html" title="windows::object_handle">windows::object_handle</a>,
78           <a class="link" href="../../reference/windows__basic_object_handle.html" title="windows::basic_object_handle">windows::basic_object_handle</a>,
79           <a class="link" href="../../reference/windows__object_handle_service.html" title="windows::object_handle_service">windows::object_handle_service</a>.
80         </p>
81 <h6>
82 <a name="boost_asio.overview.windows.object_handle.h1"></a>
83           <span><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>
84         </h6>
85 <p>
86           Windows object <code class="computeroutput"><span class="identifier">HANDLE</span></code>s
87           are only available at compile time when targeting Windows. Programs may
88           test for the macro <code class="computeroutput"><span class="identifier">BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE</span></code>
89           to determine whether they are supported.
90         </p>
91 </div>
92 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
93 <td align="left"></td>
94 <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2012 Christopher M. Kohlhoff<p>
95         Distributed under the Boost Software License, Version 1.0. (See accompanying
96         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>)
97       </p>
98 </div></td>
99 </tr></table>
100 <hr>
101 <div class="spirit-nav">
102 <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>
103 </div>
104 </body>
105 </html>