In that case, you put your Windows 10 stuff in a different .dll that doesn't get deployed on old versions of Windows.
The article has an example.
139 karma · joined January 7, 2017
The article has an example.
This is nice because it encapsulates both OS version API differences and device capabilities.
https://blogs.windows.com/buildingapps/2015/09/15/dynamicall...
using Windows.Foundation.Metadata;
if(ApiInformation.IsTypePresent("Windows.Media.Playlists.Playlist"))
{
await myAwesomePlaylist.SaveAsAsync( ... );
}
if(ApiInformation.IsApiContractPresent("Windows.Media.Playlists.PlaylistsContract"), 1, 0)
{
// Now I can use all PlayList APIs
}https://msdn.microsoft.com/en-us/windows/uwp/xaml-platform/x...
Instead of C++/Cx, you can use the new C++/WinRT, which uses standard C++ syntax and adds "await" to make async programming much easier.