c++visual-studio-2010windows-xp-sp2

Targeting Windows XP SP2 with Visual C++ 2010 (VS2010) SP1


Is it possible to target Windows XP SP2 with Visual C++ 2010 (VS2010) SP1? (i.e. do executables built with VC++2010 SP1 run fine on XP SP2?)

Or do MFC/ATL/CRT of VC++2010 SP1 use some APIs not available on XP SP2?

Thanks.


Solution

  • Just make sure that you

    #define  NTDDI_VERSION  0x05010200
    

    Before including any Windows header files. This will prevent features that are only supported on Vista and upwards from being made available to you. The value was taken from this MSDN page.