12 #ifndef ASIO_DETAIL_WIN_OBJECT_HANDLE_SERVICE_HPP 13 #define ASIO_DETAIL_WIN_OBJECT_HANDLE_SERVICE_HPP 15 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 17 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 21 #if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) 34 class win_object_handle_service
38 typedef HANDLE native_handle_type;
41 class implementation_type
46 : handle_(INVALID_HANDLE_VALUE),
47 wait_handle_(INVALID_HANDLE_VALUE),
56 friend class win_object_handle_service;
60 native_handle_type handle_;
69 op_queue<wait_op> op_queue_;
72 win_object_handle_service* owner_;
76 implementation_type* next_;
77 implementation_type* prev_;
88 ASIO_DECL void construct(implementation_type& impl);
91 ASIO_DECL void move_construct(implementation_type& impl,
92 implementation_type& other_impl);
95 ASIO_DECL void move_assign(implementation_type& impl,
96 win_object_handle_service& other_service,
97 implementation_type& other_impl);
100 ASIO_DECL void destroy(implementation_type& impl);
107 bool is_open(
const implementation_type& impl)
const 109 return impl.handle_ != INVALID_HANDLE_VALUE && impl.handle_ != 0;
117 native_handle_type native_handle(
const implementation_type& impl)
const 127 ASIO_DECL void wait(implementation_type& impl,
131 template <
typename Handler>
132 void async_wait(implementation_type& impl, Handler& handler)
135 typedef wait_handler<Handler> op;
136 typename op::ptr p = { asio::detail::addressof(handler),
138 sizeof(op), handler), 0 };
139 p.p =
new (p.v) op(handler);
143 start_wait_op(impl, p.p);
149 ASIO_DECL void start_wait_op(implementation_type& impl, wait_op* op);
156 static ASIO_DECL VOID CALLBACK wait_callback(
157 PVOID param, BOOLEAN timeout);
166 implementation_type* impl_list_;
177 #if defined(ASIO_HEADER_ONLY) 179 #endif // defined(ASIO_HEADER_ONLY) 181 #endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) 183 #endif // ASIO_DETAIL_WIN_OBJECT_HANDLE_SERVICE_HPP
Provides core I/O functionality.
class task_io_service io_service_impl
asio::detail::scoped_lock< null_mutex > scoped_lock
Class to represent an error code value.
ASIO_DECL int close(int d, state_type &state, asio::error_code &ec)
void * allocate(std::size_t s, Handler &h)
#define ASIO_HANDLER_CREATION(args)