winapifamily.h에서 볼 수 있듯이이 매크로는 보유하고있는 플랫폼과 사용중인 플랫폼에 적합한 API를 결정하는 데 사용됩니다.
/*
* Windows APIs can be placed in a partition represented by one of the below bits. The
* WINAPI_FAMILY value determines which partitions are available to the client code.
*/
#define WINAPI_PARTITION_DESKTOP 0x00000001
#define WINAPI_PARTITION_APP 0x00000002
/*
* A family may be defined as the union of multiple families. WINAPI_FAMILY should be set
* to one of these values.
*/
#define WINAPI_FAMILY_APP WINAPI_PARTITION_APP
#define WINAPI_FAMILY_DESKTOP_APP (WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_APP)
/*
* A constant that specifies which code is available to the program's target runtime platform.
* By default we use the 'desktop app' family which places no restrictions on the API surface.
* To restrict the API surface to just the App API surface, define WINAPI_FAMILY to WINAPI_FAMILY_APP.
*/
#ifndef WINAPI_FAMILY
#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
#endif
/* Macro to determine if a partition is enabled */
#define WINAPI_FAMILY_PARTITION(Partition) ((WINAPI_FAMILY & Partition) == Partition)
/* Macro to determine if only one partition is enabled from a set */
#define WINAPI_FAMILY_ONE_PARTITION(PartitionSet, Partition) ((WINAPI_FAMILY & PartitionSet) == Partition)
WINAPI_PARTITION_DESKTOP
은 시스템의 데스크톱 제품군에서 실행중인 경우에만 설정됩니다.
그러나 솔루션 "A"와 "B"는 모두 같은 시스템, 동일한 OS, 동일한 플랫폼에서 컴파일 및 실행됩니다. VS2008의 2 가지 솔루션의 차이를 유발하는 설정이 될 수 있는지 궁금합니다. – codeLover
@codeLover AFAIK 이것은 Metro 응용 프로그램과 Desktop 응용 프로그램을 비교 한 것입니다. 마지막으로 검사했을 때 VS2008에서 Metro가 지원되지 않았습니다. 내가 잘못? –
두 솔루션을 모두 데스크톱 Win7에서 실행 중이며 둘 다 데스크톱 앱입니다. – codeLover