64 lines
1.8 KiB
Plaintext
64 lines
1.8 KiB
Plaintext
From eac91922574a328ac8e1e41ab0acc21af692dbaf Mon Sep 17 00:00:00 2001
|
|
From: Jacek Caban <jacek@codeweavers.com>
|
|
Date: Mon, 6 Jul 2015 13:07:28 +0200
|
|
Subject: roapi.h: Added GetActivationFactory helpers, fixed enum argument
|
|
default value and removed version guards.
|
|
|
|
|
|
diff --git a/mingw-w64-headers/include/roapi.h b/mingw-w64-headers/include/roapi.h
|
|
index d4146ba..95c4fe6 100644
|
|
--- a/mingw-w64-headers/include/roapi.h
|
|
+++ b/mingw-w64-headers/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,
|
|
@@ -51,20 +49,21 @@ HRESULT WINAPI RoUnregisterForApartmentShutdown (APARTMENT_SHUTDOWN_REGISTRATION
|
|
|
|
HRESULT WINAPI RoGetApartmentIdentifier (UINT64 *apartmentId);
|
|
|
|
-#endif
|
|
-
|
|
#ifdef __cplusplus
|
|
|
|
namespace Windows {
|
|
namespace Foundation {
|
|
__inline HRESULT Initalize (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 +72,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));
|
|
+ }
|
|
}
|
|
}
|
|
|