Fix cancellation.
diff --git a/asio/include/asio/detail/win_iocp_handle_service.hpp b/asio/include/asio/detail/win_iocp_handle_service.hpp
index 7be49c7..28b9c2b 100644
--- a/asio/include/asio/detail/win_iocp_handle_service.hpp
+++ b/asio/include/asio/detail/win_iocp_handle_service.hpp
@@ -617,7 +617,7 @@
   void start_write_op(implementation_type& impl, boost::uint64_t offset,
       const asio::const_buffer& buffer, operation* op)
   {
-    update_cancellation_thread_id();
+    update_cancellation_thread_id(impl);
     iocp_service_.work_started();
 
     if (!is_open(impl))
@@ -655,7 +655,7 @@
   void start_read_op(implementation_type& impl, boost::uint64_t offset,
       const asio::mutable_buffer& buffer, operation* op)
   {
-    update_cancellation_thread_id();
+    update_cancellation_thread_id(impl);
     iocp_service_.work_started();
 
     if (!is_open(impl))
@@ -690,7 +690,7 @@
   }
 
   // Update the ID of the thread from which cancellation is safe.
-  void update_cancellation_thread_id()
+  void update_cancellation_thread_id(implementation_type& impl)
   {
 #if defined(ASIO_ENABLE_CANCELIO)
     if (impl.safe_cancellation_thread_id_ == 0)