locked
what does __WRL_WINRT_STRICT__ macro mean

All replies

  • You can find it in C:\Program Files (x86)\Windows Kits\8.0\Include\winrt\wrl\module.h. I think it makes WRL more security.

    #ifndef __WRL_WINRT_STRICT__
    #define CoCreatableClassWithFactoryEx(className, factory, serverName) \
        InternalWrlCreateCreatorMapEx(className##_COM, serverName, &__uuidof(className), nullptr, ::Microsoft::WRL::Details::CreateClassFactory<factory>, "minATL$__f")
    
    #define CoCreatableClassWithFactory(className, factory) \
        InternalWrlCreateCreatorMap(className##_COM, &__uuidof(className), nullptr, ::Microsoft::WRL::Details::CreateClassFactory<factory>, "minATL$__f")
    
    #define CoCreatableClass(className) \
        CoCreatableClassWithFactory(className, ::Microsoft::WRL::SimpleClassFactory<className>)
    
    #else
    // When there is WINRT strict only defined those macros should never be used
    #define CoCreatableClassWithFactoryEx(className, factory, serverName) \
        static_assert(false, "Activation of COM components. Please make sure that that you either undefine __WRL_WINRT_STRICT__ or remove CoCreatableClassWithFactoryEx macro");
    #define CoCreatableClassWithFactory(className, factory) \
        static_assert(false, "Activation of COM components. Please make sure that that you either undefine __WRL_WINRT_STRICT__ or remove CoCreatableClassWithFactory macro");
    #define CoCreatableClass(className) \
        static_assert(false, "Activation of COM components. Please make sure that that you either undefine __WRL_WINRT_STRICT__ or remove CoCreatableClass macro");
    #endif


    NEU_ShieldEdge

    Wednesday, April 18, 2012 8:38 AM