<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>windows::overlapped_ptr</title> <link rel="stylesheet" href="../../boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> <link rel="home" href="../../index.html" title="Asio"> <link rel="up" href="../reference.html" title="Reference"> <link rel="prev" href="windows__overlapped_handle.html" title="windows::overlapped_handle"> <link rel="next" href="windows__overlapped_ptr/complete.html" title="windows::overlapped_ptr::complete"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td></tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="windows__overlapped_handle.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="windows__overlapped_ptr/complete.html"><img src="../../next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="asio.reference.windows__overlapped_ptr"></a><a class="link" href="windows__overlapped_ptr.html" title="windows::overlapped_ptr">windows::overlapped_ptr</a> </h3></div></div></div> <p> <a class="indexterm" name="asio.indexterm.windows__overlapped_ptr"></a> </p> <p> Wraps a handler to create an OVERLAPPED object for use with overlapped I/O. </p> <pre class="programlisting"><span class="keyword">class</span> <span class="identifier">overlapped_ptr</span> <span class="special">:</span> <span class="identifier">noncopyable</span> </pre> <h5> <a name="asio.reference.windows__overlapped_ptr.h0"></a> <span><a name="asio.reference.windows__overlapped_ptr.member_functions"></a></span><a class="link" href="windows__overlapped_ptr.html#asio.reference.windows__overlapped_ptr.member_functions">Member Functions</a> </h5> <div class="informaltable"><table class="table"> <colgroup> <col> <col> </colgroup> <thead><tr> <th> <p> Name </p> </th> <th> <p> Description </p> </th> </tr></thead> <tbody> <tr> <td> <p> <a class="link" href="windows__overlapped_ptr/complete.html" title="windows::overlapped_ptr::complete"><span class="bold"><strong>complete</strong></span></a> </p> </td> <td> <p> Post completion notification for overlapped operation. Releases ownership. </p> </td> </tr> <tr> <td> <p> <a class="link" href="windows__overlapped_ptr/get.html" title="windows::overlapped_ptr::get"><span class="bold"><strong>get</strong></span></a> </p> </td> <td> <p> Get the contained OVERLAPPED object. </p> </td> </tr> <tr> <td> <p> <a class="link" href="windows__overlapped_ptr/overlapped_ptr.html" title="windows::overlapped_ptr::overlapped_ptr"><span class="bold"><strong>overlapped_ptr</strong></span></a> <span class="silver">[constructor]</span> </p> </td> <td> <p> Construct an empty overlapped_ptr. <br> <span class="silver"> —</span><br> Construct an overlapped_ptr to contain the specified handler. </p> </td> </tr> <tr> <td> <p> <a class="link" href="windows__overlapped_ptr/release.html" title="windows::overlapped_ptr::release"><span class="bold"><strong>release</strong></span></a> </p> </td> <td> <p> Release ownership of the OVERLAPPED object. </p> </td> </tr> <tr> <td> <p> <a class="link" href="windows__overlapped_ptr/reset.html" title="windows::overlapped_ptr::reset"><span class="bold"><strong>reset</strong></span></a> </p> </td> <td> <p> Reset to empty. <br> <span class="silver"> —</span><br> Reset to contain the specified handler, freeing any current OVERLAPPED object. </p> </td> </tr> <tr> <td> <p> <a class="link" href="windows__overlapped_ptr/_overlapped_ptr.html" title="windows::overlapped_ptr::~overlapped_ptr"><span class="bold"><strong>~overlapped_ptr</strong></span></a> <span class="silver">[destructor]</span> </p> </td> <td> <p> Destructor automatically frees the OVERLAPPED object unless released. </p> </td> </tr> </tbody> </table></div> <p> A special-purpose smart pointer used to wrap an application handler so that it can be passed as the LPOVERLAPPED argument to overlapped I/O functions. </p> <h5> <a name="asio.reference.windows__overlapped_ptr.h1"></a> <span><a name="asio.reference.windows__overlapped_ptr.thread_safety"></a></span><a class="link" href="windows__overlapped_ptr.html#asio.reference.windows__overlapped_ptr.thread_safety">Thread Safety</a> </h5> <p> <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe. </p> <p> <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe. </p> <h5> <a name="asio.reference.windows__overlapped_ptr.h2"></a> <span><a name="asio.reference.windows__overlapped_ptr.requirements"></a></span><a class="link" href="windows__overlapped_ptr.html#asio.reference.windows__overlapped_ptr.requirements">Requirements</a> </h5> <p> <span class="emphasis"><em>Header: </em></span><code class="literal">asio/windows/overlapped_ptr.hpp</code> </p> <p> <span class="emphasis"><em>Convenience header: </em></span><code class="literal">asio.hpp</code> </p> </div> <div class="copyright-footer">Copyright © 2003-2023 Christopher M. Kohlhoff<p> Distributed under the Boost Software License, Version 1.0. (See accompanying 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>) </p> </div> <hr> <div class="spirit-nav"> <a accesskey="p" href="windows__overlapped_handle.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="windows__overlapped_ptr/complete.html"><img src="../../next.png" alt="Next"></a> </div> </body> </html>