[Boost-bugs] [Boost C++ Libraries] #3017: ASIO Compile Errors on Visual Studio 2008, 64 bit

Subject: [Boost-bugs] [Boost C++ Libraries] #3017: ASIO Compile Errors on Visual Studio 2008, 64 bit
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-11 17:36:01


#3017: ASIO Compile Errors on Visual Studio 2008, 64 bit
----------------------------------+-----------------------------------------
 Reporter: cheesy4poofs_at_[hidden] | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: None
  Version: Boost 1.38.0 | Severity: Problem
 Keywords: |
----------------------------------+-----------------------------------------
 I've been getting and correcting these compile time errors since boost
 1.34, finally decided to report them. Only occurs with Windows x64
 builds.

 boost/asio/detail/win_thread.hpp(151) : error C2664: 'QueueUserAPC' :
 cannot convert parameter 1 from 'void (__cdecl *)(ULONG)' to 'PAPCFUNC'
         None of the functions with this name in scope match the target
 type

 boost/asio/detail/win_iocp_io_service.hpp(142) : error C2664:
 'GetQueuedCompletionStatus' : cannot convert parameter 3 from 'DWORD *' to
 'PULONG_PTR'
         Types pointed to are unrelated; conversion requires
 reinterpret_cast, C-style cast or function-style cast

 boost/asio/detail/win_iocp_io_service.hpp(430) : error C2664:
 'GetQueuedCompletionStatus' : cannot convert parameter 3 from 'DWORD *' to
 'PULONG_PTR'
         Types pointed to are unrelated; conversion requires
 reinterpret_cast, C-style cast or function-style cast


 The fixes are:

 win_thread.hpp:151

       ::QueueUserAPC((PAPCFUNC) apc_function, thread_, 0);


 win_iocp_io_service.hpp:135

 #if (WINVER < 0x0500)
       ULONG_PTR completion_key = 0;
 #else
       ULONG_PTR completion_key = 0;
 #endif



 win_iocp_io_service.hpp:422

 #if (WINVER < 0x0500)
       ULONG_PTR completion_key = 0;
 #else
       ULONG_PTR completion_key = 0;
 #endif

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3017>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC