Use CreateEventW rather than CreateEvent.
This commit is contained in:
parent
7d8916137d
commit
b79642e7c7
@ -32,9 +32,9 @@ win_event::win_event()
|
||||
: state_(0)
|
||||
{
|
||||
#if defined(ASIO_WINDOWS_APP)
|
||||
events_[0] = ::CreateEventEx(0, 0, CREATE_EVENT_MANUAL_RESET, 0);
|
||||
events_[0] = ::CreateEventExW(0, 0, CREATE_EVENT_MANUAL_RESET, 0);
|
||||
#else // defined(ASIO_WINDOWS_APP)
|
||||
events_[0] = ::CreateEvent(0, true, false, 0);
|
||||
events_[0] = ::CreateEventW(0, true, false, 0);
|
||||
#endif // defined(ASIO_WINDOWS_APP)
|
||||
if (!events_[0])
|
||||
{
|
||||
@ -45,9 +45,9 @@ win_event::win_event()
|
||||
}
|
||||
|
||||
#if defined(ASIO_WINDOWS_APP)
|
||||
events_[1] = ::CreateEventEx(0, 0, 0, 0);
|
||||
events_[1] = ::CreateEventExW(0, 0, 0, 0);
|
||||
#else // defined(ASIO_WINDOWS_APP)
|
||||
events_[1] = ::CreateEvent(0, false, false, 0);
|
||||
events_[1] = ::CreateEventW(0, false, false, 0);
|
||||
#endif // defined(ASIO_WINDOWS_APP)
|
||||
if (!events_[1])
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
OffsetHigh = 0;
|
||||
|
||||
// Create a non-signalled manual-reset event, for GetOverlappedResult.
|
||||
hEvent = ::CreateEvent(0, TRUE, FALSE, 0);
|
||||
hEvent = ::CreateEventW(0, TRUE, FALSE, 0);
|
||||
if (hEvent)
|
||||
{
|
||||
// As documented in GetQueuedCompletionStatus, setting the low order
|
||||
|
@ -65,7 +65,7 @@ std::size_t win_thread::hardware_concurrency()
|
||||
void win_thread::start_thread(func_base* arg, unsigned int stack_size)
|
||||
{
|
||||
::HANDLE entry_event = 0;
|
||||
arg->entry_event_ = entry_event = ::CreateEvent(0, true, false, 0);
|
||||
arg->entry_event_ = entry_event = ::CreateEventW(0, true, false, 0);
|
||||
if (!entry_event)
|
||||
{
|
||||
DWORD last_error = ::GetLastError();
|
||||
@ -75,7 +75,7 @@ void win_thread::start_thread(func_base* arg, unsigned int stack_size)
|
||||
asio::detail::throw_error(ec, "thread.entry_event");
|
||||
}
|
||||
|
||||
arg->exit_event_ = exit_event_ = ::CreateEvent(0, true, false, 0);
|
||||
arg->exit_event_ = exit_event_ = ::CreateEventW(0, true, false, 0);
|
||||
if (!exit_event_)
|
||||
{
|
||||
DWORD last_error = ::GetLastError();
|
||||
|
Loading…
Reference in New Issue
Block a user