how to call different Win API based on Windows version?
Posted
by liuliu
on Stack Overflow
See other posts from Stack Overflow
or by liuliu
Published on 2010-01-08T21:59:56Z
Indexed on
2010/03/20
19:41 UTC
Read the original article
Hit count: 311
The specific problem is, the support of condition variable on Windows begins from Vista, for early version of Windows (Windows XP), I have a emulated condition variable code sort of solved the problem. However, I'd like to have the ability to call native condition variable API when the system supported and fallback to my version only on XP and earlier version. I tried to detect windows version with GetVersionInfo API, but it still gives me error on start time (cannot find API entry of InitializeConditionVariable sort of).
I am not familiar with Windows programming, how do you solve the gentle fallback problem nicely?
© Stack Overflow or respective owner