Skip to content

Commit

Permalink
improve version check
Browse files Browse the repository at this point in the history
  • Loading branch information
stevefan1999-personal authored and mingkuang-Chuyu committed Oct 19, 2024
1 parent 389b63a commit a8d6ec2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Thunks/WS2_32.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <winsock2.h>
#include <ws2tcpip.h>
#include <VersionHelpers.h>

#ifdef FreeAddrInfoEx
#undef FreeAddrInfoEx
Expand Down Expand Up @@ -1491,7 +1490,7 @@ namespace YY::Thunks
{
const auto result = pWSAIoctl(s, dwIoControlCode, lpvInBuffer, cbInBuffer, lpvOutBuffer, cbOutBuffer, lpcbBytesReturned, lpOverlapped, lpCompletionRoutine);

if (!IsWindowsVistaOrGreater())
if (internal::GetSystemVersion() < internal::MakeVersion(6, 0))
{
// SIO_BASE_HANDLE is defined in the Mswsock.h header file and supported on Windows Vista and later.
// So while we do have layered service providers in Windows XP or earlier, this specific io control is not supported.
Expand Down

0 comments on commit a8d6ec2

Please sign in to comment.