
On 08.05.2015 5:39, Gavin Lambert wrote:
This might eventually bite you.
Granted that I haven't verified this myself, but one of the reasons announced for the "_xp" vs. not-"_xp" toolsets was that the SDK team had removed XP support from the latest Platform SDK. So one of the things that _xp does is to select the older Platform SDK headers that still do support XP.
Most APIs are the same between XP and Vista/7, so *most of the time* you can get away with using the wrong version, just like most of the time you can get away with running code compiled with _WIN32_WINNT=0x0601 on XP.
If you happen to use one of the APIs that doesn't exist on XP, though, or (harder to track down) if you use one of the APIs that does exist on both but has had a structure size change, then you'll get code that mysteriously fails on XP by using the wrong toolset and/or wrong _WIN32_WINNT setting.
Good to know, thanks. No problems so far though.
The toolset also affects which version of ATL/MFC are linked to, and again since the newer versions of these do make use of non-XP-compatible APIs in some classes, if you happen to use these in your own code then you'll have problems on XP. (And since this is an implementation detail, it's not documented which classes are "safe" on XP when using the non-XP toolset.)
ATL/MFC isn't used by that code. Thank you, Gevorg