In C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0A\\Include\\WinCrypt.h, the definition for CERT_CHAIN_ENGINE_CONFIG is
typedef
the value of NTDDI_WIN7 which in my case is incorrect as mine is a XP SP3 machine.
As I understand it, the variables are initialized according to what system you are targeting, not what system you are compiling the code on. So you need to look at your project settings and see, what is your target platform, what headers are referenced etc. .