Hi Viktor,

_WIN32_WINNT is nice, but it has other purpose.

NTDDI_VERSION = maximum OS version supported by SDK/Windows-headers
_WIN32_WINNT = OS version we want to target

Okay, but if you remember my thread starting post .-
"
IMHO the best solution is to define the version of Windows that supports the C 
compiler before compilation.
For example, if your C compiler supports Vista: set 
HB_USER_CFLAGS=-D_WIN32_WINNT 0x0600

http://msdn.microsoft.com/en-us/library/aa383745%28VS.85%29.aspx

Some structures are defined only in the headers from one version of Windows 
other may change.
IPv6 is supported from Windows Server 2003, Windows XP.
Even calling functions dynamically is necessary data with which they work.
It can make the binary work with earlier versions but the headers and the code 
should be protected by .-
#if _WIN32_WINNT >= 0x0501
    ...
#endif
If not, we can have compile-time errors.
Please, what do you think about this, comments?
"
And we *force* _WIN32_WINNT or NTDDI_VERSION in hard code.
If someone compiles Harbour with earlier versions of C compiler headers may 
have compile-time errors.

IMHO we need a solution in to make-system and I'm not an expert on this.

Best regards,
--
Xavi

El 28/02/2010 18:12, Viktor Szakáts escribió:

On 2010 Feb 28, at 18:02, Xavi wrote:

Hi Viktor,

Yes, NTDDI_VERSION is the (best? only?) way to detect
platform SDK version.

The only problem is that MinGW does not use NTDDI_VERSION, it uses _WIN32_WINNT.
At least in my versions of MinGW. :)

Yes, unfortunately the problem with NTDDI_VERSION,
is that it's not backward compatible solution (they
introduces it quite late), and some 3rd party Windows
headers set don't support it (yet).

_WIN32_WINNT is nice, but it has other purpose.

NTDDI_VERSION = maximum OS version supported by SDK/Windows-headers
_WIN32_WINNT = OS version we want to target

BTW, the values are also different, to make it simpler.

Brgds,
Viktor
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to