|
From: | Steve Lhomme |
Subject: | Re: [PATCH v2] win32: don't force _WIN32_WINNT to a lower version |
Date: | Wed, 27 May 2020 08:16:03 +0200 |
Hi, On 2020-05-26 22:38, Bruno Haible wrote:
Hi Steve,/* Ensure that <windows.h> declares GetFileSizeEx. */+#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0500 # undef _WIN32_WINNT # define _WIN32_WINNT _WIN32_WINNT_WIN2K +#endifWhat do you gain by this? What does it bring to compile this code with a higher _WIN32_WINNT value?
It's general good practice. In another file I modified I did not understand why I was still getting the old APIs when I was selecting Win10. So I modified the places where the value is enforced. It's future proof when editing files.
When building for UWP it's particularly important as a lot of APIs may be hidden if you use the proper values and they are hidden because you shouldn't use them. Forcing to use them when they shouldn't will lead to apps that don't run.
[Prev in Thread] | Current Thread | [Next in Thread] |