Fix warnings about incompatible pointer cast when obtaining CancelIoEx entry point.
This commit is contained in:
parent
734e339d3f
commit
6cec63e8a6
@ -242,7 +242,8 @@ asio::error_code win_iocp_handle_service::cancel(
|
||||
{
|
||||
// The version of Windows supports cancellation from any thread.
|
||||
typedef BOOL (WINAPI* cancel_io_ex_t)(HANDLE, LPOVERLAPPED);
|
||||
cancel_io_ex_t cancel_io_ex = (cancel_io_ex_t)cancel_io_ex_ptr;
|
||||
cancel_io_ex_t cancel_io_ex = reinterpret_cast<cancel_io_ex_t>(
|
||||
reinterpret_cast<void*>(cancel_io_ex_ptr));
|
||||
if (!cancel_io_ex(impl.handle_, 0))
|
||||
{
|
||||
DWORD last_error = ::GetLastError();
|
||||
|
@ -249,7 +249,8 @@ asio::error_code win_iocp_socket_service_base::cancel(
|
||||
{
|
||||
// The version of Windows supports cancellation from any thread.
|
||||
typedef BOOL (WINAPI* cancel_io_ex_t)(HANDLE, LPOVERLAPPED);
|
||||
cancel_io_ex_t cancel_io_ex = (cancel_io_ex_t)cancel_io_ex_ptr;
|
||||
cancel_io_ex_t cancel_io_ex = reinterpret_cast<cancel_io_ex_t>(
|
||||
reinterpret_cast<void*>(cancel_io_ex_ptr));
|
||||
socket_type sock = impl.socket_;
|
||||
HANDLE sock_as_handle = reinterpret_cast<HANDLE>(sock);
|
||||
if (!cancel_io_ex(sock_as_handle, 0))
|
||||
|
Loading…
Reference in New Issue
Block a user