2

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.

  • 1
    @HansPassant: Thanks. Do you have any official reference of Microsoft? Did you do some tests with your software? Thanks. –  Jan 17 '12 at 22:46

1 Answers1

2

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.

Jon
  • 428,835
  • 81
  • 738
  • 806
  • Or, in alternative, it is possible to use LoadLibrary/GetProcAddress to dynamically load the Windows 7 specific API's only when the app is running on Win7 (and just don't use them on XP). –  Jan 18 '12 at 16:37