Fix handler tracking on WinRT.
This commit is contained in:
parent
55194c01f5
commit
6614ff63b2
@ -39,7 +39,9 @@
|
||||
# include "asio/wait_traits.hpp"
|
||||
#endif // defined(ASIO_HAS_BOOST_DATE_TIME)
|
||||
|
||||
#if !defined(ASIO_WINDOWS)
|
||||
#if defined(ASIO_WINDOWS_RUNTIME)
|
||||
# include "asio/detail/socket_types.hpp"
|
||||
#elif !defined(ASIO_WINDOWS)
|
||||
# include <unistd.h>
|
||||
#endif // !defined(ASIO_WINDOWS)
|
||||
|
||||
@ -327,7 +329,11 @@ void handler_tracking::write_line(const char* format, ...)
|
||||
|
||||
va_end(args);
|
||||
|
||||
#if defined(ASIO_WINDOWS)
|
||||
#if defined(ASIO_WINDOWS_RUNTIME)
|
||||
wchar_t wline[256] = L"";
|
||||
mbstowcs_s(0, wline, sizeof(wline) / sizeof(wchar_t), line, length);
|
||||
::OutputDebugStringW(wline);
|
||||
#elif defined(ASIO_WINDOWS)
|
||||
HANDLE stderr_handle = ::GetStdHandle(STD_ERROR_HANDLE);
|
||||
DWORD bytes_written = 0;
|
||||
::WriteFile(stderr_handle, line, length, &bytes_written, 0);
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
if (owner)
|
||||
{
|
||||
fenced_block b(fenced_block::half);
|
||||
ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
|
||||
ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
|
||||
w.complete(handler, handler.handler_);
|
||||
ASIO_HANDLER_INVOCATION_END;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
|
||||
// Asynchronously resolve a query to a list of entries.
|
||||
template <typename Handler>
|
||||
void async_resolve(implementation_type&,
|
||||
void async_resolve(implementation_type& impl,
|
||||
const query_type& query, Handler& handler)
|
||||
{
|
||||
bool is_continuation =
|
||||
@ -131,6 +131,7 @@ public:
|
||||
|
||||
ASIO_HANDLER_CREATION((io_service_.context(),
|
||||
*p.p, "resolver", &impl, 0, "async_resolve"));
|
||||
(void)impl;
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
if (owner)
|
||||
{
|
||||
fenced_block b(fenced_block::half);
|
||||
ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
|
||||
ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_));
|
||||
w.complete(handler, handler.handler_);
|
||||
ASIO_HANDLER_INVOCATION_END;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user