On 09/09/2015 05:48 PM, Gilles Khouzam wrote:
> Even though GetVersionEx is deprecated,
> it is the right way to get the system version, loading ntdll and
> getting RtlGetVersion is not a good practice as those are private
> APIs that could change.

The change was contributed recently:

 Windows: Fix CMAKE_HOST_SYSTEM_VERSION on Windows >= 8.1 (#15674)
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4736d53

for this issue:

 http://www.cmake.org/Bug/view.php?id=15674

I've re-opened the issue.  I would really like to know why MS
deprecated GetVersionEx.  The Version Helper APIs are only good
for checking >= level, not getting the actual version.  Why
not add the helpers and leave GetVersionEx available too?  Why
do we need to add a manifest just to get the OS version?  What
is a library author supposed to do when s/he cannot control the
application that will link the library?

FYI, the GetVersionEx documentation page:

 
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451%28v=vs.85%29.aspx

has a community-mentioned recommendation to use RtlGetVersion.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to