Hi Viktor and all, Well. Some questions. If this is do it an implementation for MinGW. MinGW need to define _WIN32_WINNT before using the headers.
http://oldwiki.mingw.org/index.php/header-w32api_h Should I force the code _WIN32_WINNT or use WINVER? Is this true for mingwce? Can I protect the code as standard headers? ... #if _WIN32_WINNT >= 0x0501 ... __MINGW32__ and __MINGW64__ they are both compiler 's built-in macros. Is defined in mingwce? Best regards, -- Xavi El 26/02/2010 18:06, Viktor Szakáts escribió:
Hi, If there is a way to dynamically find out the version of the structure returned by function in question, so that we can be sure that required fields are present, we may force 0x0600 version in source, just to get the structure definitions from official headers. Plus we also need to add support for older SDK versions, where the newer structure items were not yet available at all (for this there doesn't seem to exist well-known and documented way, so historically we check compiler version, assuming that it's always tied with a given PSDK version (which is theoretically wrong, but works in most installations)). Brgds, Viktor On Fri, Feb 26, 2010 at 5:51 PM, Xavi <[email protected] <mailto:[email protected]>> wrote: Hi all, 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? -- Xavi
_______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
