News for hackers. Stuff that matters.
Re:Dotfile madness by ChrisSD on Sunday February 03, 2019 @04:39PM (#19072402)
What's wrong with calling IsWindowsVistaOrGreater[0]?

[0] https://docs.microsoft.com/en-us/windows/desktop/api/version...

Re:Dotfile madness by user5994461 on Sunday February 03, 2019 @05:15PM (#19072586)
You won't have the chance to call anything. If the executable is statistically linked to the latest API, the executable won't be able to load on older systems.

I'm surprised that these new IsWindows...() functions claim compatibility down to Windows 2000. Doubt microsoft knew how they would name their next release 20 years ago. A Google search indicates that they are in fact broken.

Re:Dotfile madness by ChrisSD on Sunday February 03, 2019 @06:58PM (#19073003)
You won't be able to compile with the function imported using the modern lib (because it doesn't exist on XP) but you can conditionally link it at runtime with LoadLibrary/GetProcAddress.

If IsWindows... doesn't work then you can use the VerifyVersionInfo function directly.