Windows 2008 SDK, Windows 2000, and sockets
Hey,
I am trying to build a ~2 million line C++ MFC application on the Windows Server 2008 SDK (actually indirectly via VS 2008 Beta 2). This application defines WINVER and _WIN32_WINNT to 0x0500 because our customers have not told us we can abandon Windows 2000 yet.
Now, the release notes for the SDK say it is for targeting Vista, XP, and Windows Server 2003, but the compiler is perfectly willing to compile my files with those #defines set to 0x0500. Except one: the code that communicates over sockets. The compile fails for a couple reasons, but the main reason is that the SOCKADDR_STORAGE typedef is not created in the new SDK if _WIN32_WINNT < 0x0501 (see ws2def.h compared to winsock2.h in the Win2k3 SDK). This leads me to wonder what the real status of Windows 2000 support is for the Windows 2008 SDK: I see a few possibilities:
Possibility 1: Targetting Windows 2000 with the Windows 2008 SDK is plainly and simply not supported. Microsoft will disallow builds where _WIN32_WINNT < 0x0501 when the SDK RTM's, but just hasn't gotten around to it.
Possibility 2: Targetting Windows 2000 with the Windows 2008 SDK is plainly and simply not supported. Microsoft is not going to prevent builds with _WIN32_WINNT < 0x0501 nor go change all the header files to remove Win2000 support, but new changes that are required to header files will be made under the assumption that Windows 2000 no longer exists, so build with _WIN32_WINNT < 0x0501 at your own risk.
Possibility 3: Targetting Windows 2000 with the Windows 2008 SDK is expected, but there were problems with sockets on Windows 2000, and changes to the header files causing SOCKADDR_STORAGE to not get defined if _WIN32_WINNT < 0x0501 were done on purpose to keep people from getting into trouble.
Possibility 4: Targetting Windows 2000 with the Windows 2008 SDK is expected, and the problem with SOCKADDR_STORAGE not getting defined is a bug in the SDK headers that will be fixed before the Windows 2008 SDK goes production.
There are also some protocol identifiers such as IPPROTO_IPV4 and IPPROTO_IPV6 that were unconditionally defined in winsock2.h in the Win2k3 SDK but that are quite purposefully not defined for _WIN32_WINNT < 0x0501 in ws2def.h in the Windows 2008 SDK.
Thanks for any insight you can provide.
Eric

