Boost C++ Libraries: Ticket #3017: ASIO Compile Errors on Visual Studio 2008, 64 bit https://svn.boost.org/trac10/ticket/3017 <p> 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. </p> <p> boost/asio/detail/win_thread.hpp(151) : error C2664: 'QueueUserAPC' : cannot convert parameter 1 from 'void (<span class="underline">cdecl *)(ULONG)' to 'PAPCFUNC' </span></p> <blockquote> <p> None of the functions with this name in scope match the target type </p> </blockquote> <p> boost/asio/detail/win_iocp_io_service.hpp(142) : error C2664: '<a class="missing wiki">GetQueuedCompletionStatus</a>' : cannot convert parameter 3 from 'DWORD *' to 'PULONG_PTR' </p> <blockquote> <p> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast </p> </blockquote> <p> boost/asio/detail/win_iocp_io_service.hpp(430) : error C2664: '<a class="missing wiki">GetQueuedCompletionStatus</a>' : cannot convert parameter 3 from 'DWORD *' to 'PULONG_PTR' </p> <blockquote> <p> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast </p> </blockquote> <p> The fixes are: </p> <p> win_thread.hpp:151 </p> <blockquote> <p> ::QueueUserAPC((PAPCFUNC) apc_function, thread_, 0); </p> </blockquote> <p> win_iocp_io_service.hpp:135 </p> <p> #if (WINVER &lt; 0x0500) </p> <blockquote> <p> ULONG_PTR completion_key = 0; </p> </blockquote> <p> #else </p> <blockquote> <p> ULONG_PTR completion_key = 0; </p> </blockquote> <p> #endif </p> <p> win_iocp_io_service.hpp:422 </p> <p> #if (WINVER &lt; 0x0500) </p> <blockquote> <p> ULONG_PTR completion_key = 0; </p> </blockquote> <p> #else </p> <blockquote> <p> ULONG_PTR completion_key = 0; </p> </blockquote> <p> #endif </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3017 Trac 1.4.3 Steven Watanabe Sat, 30 May 2009 00:18:24 GMT component changed https://svn.boost.org/trac10/ticket/3017#comment:1 https://svn.boost.org/trac10/ticket/3017#comment:1 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">asio</span> </li> </ul> Ticket chris_kohlhoff Fri, 26 Jun 2009 14:17:43 GMT <link>https://svn.boost.org/trac10/ticket/3017#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3017#comment:2</guid> <description> <p> This looks suspiciously like you're not using a recent enough value for WINVER. From memory, Win64 requires 0x502 or later (i.e. Windows Server 2003). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Thu, 18 Mar 2010 03:38:05 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3017#comment:3 https://svn.boost.org/trac10/ticket/3017#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Closing since there have been no further comments. The 64-bit Windows regression tests show no failures. Furthermore, the code has since been changed to default to the newer types (e.g. ULONG_PTR rather than ULONG) if WINVER is not defined. </p> Ticket