Reputation: 2821
Is there a predefine when we are building for Windows 8 and Windows 8.1 store applications, we need to detect which is selected so that we can disable some features.
I ask this because we're porting Windows 8.1 app to Windows 8. In Windows 8 some features are not available so we need to override them and implement something else. (Two projects, same code)
Upvotes: 0
Views: 347
Reputation: 4424
Have a look at the NTDDI_VERSION
macro.
#if NTDDI_VERSION == 0x06030000 // NTDDI_WINBLUE
/* Windows 8.1 */
#elif NTDDI_VERSION == 0x06020000 // NTDDI_WIN8
/* Windows 8 */
#endif
Make sure you've included SdkDdkVer.h
, but it I believe most Windows projects already do that by default.
Upvotes: 1