I am new to Windows programming and I\'m trying to discover the best way to check for the existence of Windows Shell API functions. I want to use some of the new taskbar fea
I disagree with the currrent solutions. You'll end up with quite a bit of unreadable code.
A nicer alternative is to wrap the functionality in a custom Windows 7-only DLL. For other systems, provide another version of the DLL that implements the same functions. This can often be a no-op. E.g. a function to set the taskbar extensions would be a no-op on older Windows versions.
The dynamic switching between these DLLs is done by using the delay-load feature of MSVC. You can use a custom hook in your EXE to pick the correct DLL version when the first function in your DLL is called, at which time you know whether you're running on Windows 7.