The MSDN seems to be misleading here.
IsWindows10OrGreater
requires the Windows 10 SDK and (I'm not absolutely sure with this) that the application is manifested for Windows 10.
If your application is not manifested for Windows 10,
IsWindows10OrGreater
will return
false
(or fail to work - I'm again not sure) even when running on Windows 10.
You may also have a look at the
VersionHelpers.h file. The used functions are supported since Windows 2000.
So it should work when specifying Windows 10 in the manifest and not used at all otherwise.
[EDIT]
When not specifying Windows 10 in the manifest there are solutions to detect Windows 10. However, such is ot recommended by Microsoft.
Part1: Overcoming Windows 8.1's deprecation of GetVersionEx and GetVersion APIs[
^]
Getting Operating System Version Info - Even for Windows 10![
^]
[/EDIT]