diff options
Diffstat (limited to 'x86_64-w64-mingw32/include/roapi.h')
-rw-r--r-- | x86_64-w64-mingw32/include/roapi.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/x86_64-w64-mingw32/include/roapi.h b/x86_64-w64-mingw32/include/roapi.h index d4146ba0..14d94c38 100644 --- a/x86_64-w64-mingw32/include/roapi.h +++ b/x86_64-w64-mingw32/include/roapi.h @@ -13,8 +13,6 @@ #include <inspectable.h> #include <activation.h> -#if _WIN32_WINNT >= _WIN32_WINNT_WIN8 - typedef enum RO_INIT_TYPE { #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) RO_INIT_SINGLETHREADED = 0, @@ -26,7 +24,9 @@ typedef struct { } *RO_REGISTRATION_COOKIE; typedef HRESULT (WINAPI *PFNGETACTIVATIONFACTORY)(HSTRING, IActivationFactory **); -/* */ +#ifdef __cplusplus +extern "C" { +#endif HRESULT WINAPI RoActivateInstance(HSTRING activatableClassId, IInspectable **instance); @@ -51,20 +51,22 @@ HRESULT WINAPI RoUnregisterForApartmentShutdown (APARTMENT_SHUTDOWN_REGISTRATION HRESULT WINAPI RoGetApartmentIdentifier (UINT64 *apartmentId); -#endif - #ifdef __cplusplus +} /* extern "C" */ namespace Windows { namespace Foundation { - __inline HRESULT Initalize (RO_INIT_TYPE it + __inline HRESULT Initialize (RO_INIT_TYPE it #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) - = 0 + = RO_INIT_SINGLETHREADED #endif ) { return RoInitialize (it); } __inline void Uninitialize () { RoUninitialize (); } + template<class T> __inline HRESULT GetActivationFactory(HSTRING classid, T **factory) { + return RoGetActivationFactory(classid, IID_INS_ARGS(factory)); + } } } @@ -73,12 +75,16 @@ namespace ABI { namespace Foundation { __inline HRESULT Initialze (RO_INIT_TYPE it #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) - = 0 + = RO_INIT_SINGLETHREADED #endif ) { return RoInitialize (it); } __inline void Uninitialize () { RoUninitialize (); } } + + template<class T> __inline HRESULT GetActivationFactory(HSTRING classid, T **factory) { + return RoGetActivationFactory(classid, IID_INS_ARGS(factory)); + } } } |