Toch nog even compatible blijven met de winsock van Windows 2003R2

svn path=/Slnkdwf/trunk/; revision=26229
This commit is contained in:
Jos Groot Lipman
2015-09-08 15:22:02 +00:00
parent 1217f64b61
commit b1bf0bd021
2 changed files with 9 additions and 2 deletions

View File

@@ -152,7 +152,10 @@ STDMETHODIMP CWinSock::OpenConnection()
setsockopt(m_socket, SOL_SOCKET, SO_SNDTIMEO, (const char*)&nTimeout, sizeof(int));
setsockopt(m_socket, SOL_SOCKET, SO_RCVTIMEO, (const char*)&nTimeout, sizeof(int));
InetPton(AF_INET, m_RemoteHostIP, &server.sin_addr.s_addr);
// InetPton(AF_INET, m_RemoteHostIP, &server.sin_addr.s_addr);
// Zolang we nog Windows 2003R2 (willen) ondersteunen:
// is dit gezet in stdafx.h: #define _WINSOCK_DEPRECATED_NO_WARNINGS
server.sin_addr.s_addr = inet_addr(m_RemoteHostIP);
server.sin_family = AF_INET;
server.sin_port = htons((u_short)(m_RemotePort));

View File

@@ -4,6 +4,9 @@
#pragma once
// Zolang we nog Windows 2003R2 (willen) ondersteunen:
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include "../SLNKDwfImpl/targetsxs.h"
#ifndef STRICT
@@ -17,7 +20,8 @@
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0600 // Vista/2008 Change this to the appropriate value to target other versions of Windows.
#define _WIN32_WINNT 0x0502 // 502 is nodig voor 2003R2 Change this to the appropriate value to target other versions of Windows.
// 600 voor Vista/2008
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.