diff --git a/src/Nazara/Core/Win32/ConditionVariableImpl.cpp b/src/Nazara/Core/Win32/ConditionVariableImpl.cpp index 388a7f587..002a9656a 100644 --- a/src/Nazara/Core/Win32/ConditionVariableImpl.cpp +++ b/src/Nazara/Core/Win32/ConditionVariableImpl.cpp @@ -57,7 +57,7 @@ namespace Nz bool ConditionVariableImpl::Wait(MutexImpl* mutex, UInt32 timeout) { #if NAZARA_CORE_WINDOWS_VISTA - return SleepConditionVariableCS(&m_cv, &mutex->m_criticalSection, timeout); + return SleepConditionVariableCS(&m_cv, &mutex->m_criticalSection, timeout) == TRUE; #else m_count++; diff --git a/src/Nazara/Network/Win32/IpAddressImpl.cpp b/src/Nazara/Network/Win32/IpAddressImpl.cpp index 0097227ef..97d7a10e3 100644 --- a/src/Nazara/Network/Win32/IpAddressImpl.cpp +++ b/src/Nazara/Network/Win32/IpAddressImpl.cpp @@ -18,7 +18,7 @@ namespace Nz int GetAddressInfo(const String& hostname, const String& service, const addrinfoImpl* hints, addrinfoImpl** results) { - return GetAddrInfoW(hostname.GetWideString().c_str(), service.GetWideString().c_str(), &hints, &servinfo); + return GetAddrInfoW(hostname.GetWideString().c_str(), service.GetWideString().c_str(), hints, results); } int GetHostnameInfo(sockaddr* socketAddress, socklen_t socketLen, String* hostname, String* service, INT flags) @@ -26,14 +26,14 @@ namespace Nz std::array hostnameBuffer; std::array serviceBuffer; - int result = GetNameInfoW(socketAddress, socketLen, hostnameBuffer.data(), hostnameBuffer.size(), serviceBuffer.data(), serviceBuffer.size(), flags); + int result = GetNameInfoW(socketAddress, socketLen, hostnameBuffer.data(), static_cast(hostnameBuffer.size()), serviceBuffer.data(), static_cast(serviceBuffer.size()), flags); if (result == 0) { if (hostname) - hostname->Set(hostnameBuffer.data()); + *hostname = std::move(String::Unicode(hostnameBuffer.data())); if (service) - service->Set(serviceBuffer.data()); + *service = std::move(String::Unicode(serviceBuffer.data())); } return result;