Win32 use of GetVersionEx()
Date: Wed, 15 Jan 2014 20:32:57 +0000
I have just pushed commit c7a76bb056f31e to fix the build warnings
associated with GetVersionEx() on Windows when compiling with Visual Studio
In summary, and as of Windows 8.1, this function has been marked deprecated
and it's return value altered depending on an application's manifest file
and what operating system it is targeted at . Applications that are not
manifested will only return v6.2 regardless of whether they are running on
Windows 8 (NT Kernel v6.2) or Windows 8.1 (NT Kernel v6.3) and as such it is
recommended to use the Version Helper API instead.
Given this, I have implemented the appropriate Version Helper functions in
both connect.c and curl_sspi.c where we currently use GetVersionEx(). The
functions I have used have been available since Windows 2000 (NT Kernel
v5.0)  rather than the newer aliases which Microsoft are also providing
I would appreciate it if some of my Win32 colleagues here, could take a look
at the patch  and provide any additional feedback if required.
You will note that I have kept the existing GetVersionEx() code and
protected it by "#if !defined(VerifyVersionInfo)", in case it is compiled
for an older version of the Windows NT kernel or even the old non NT
variants (Windows 3.1, 95, 98 and ME). Note that the #if !defined could be
modified to a specific version of Visual Studio or Platform SDK if need be -
your thoughts are appreciated.
Many thanks in advance.
 = http://curl.haxx.se/dev/log.cgi?id=20140115000200-10369#prob1
List admin: http://cool.haxx.se/list/listinfo/curl-library
Received on 2014-01-15