wine-staging/patches/combase-RoApi/0004-combase-Implement-RoActivateInstance.patch
2018-02-17 14:01:23 +11:00

82 lines
2.8 KiB
Diff

From 8274b8bb8f25d89c2f01b1724aed7e9e2eb5614b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 01:45:30 +0100
Subject: [PATCH 2/7] combase: Implement RoActivateInstance.
---
.../api-ms-win-core-winrt-l1-1-0.spec | 2 +-
dlls/combase/combase.spec | 2 +-
dlls/combase/roapi.c | 24 +++++++++++++++++++++-
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec
index 74c9d27..978c3dc 100644
--- a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec
+++ b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec
@@ -1,4 +1,4 @@
-@ stub RoActivateInstance
+@ stdcall RoActivateInstance(ptr ptr) combase.RoActivateInstance
@ stdcall RoGetActivationFactory(ptr ptr ptr) combase.RoGetActivationFactory
@ stub RoGetApartmentIdentifier
@ stdcall RoInitialize(long) combase.RoInitialize
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
index c238eb8..f42bdae 100644
--- a/dlls/combase/combase.spec
+++ b/dlls/combase/combase.spec
@@ -242,7 +242,7 @@
@ stdcall PropVariantClear(ptr) ole32.PropVariantClear
@ stdcall PropVariantCopy(ptr ptr) ole32.PropVariantCopy
@ stub ReleaseFuncDescs
-@ stub RoActivateInstance
+@ stdcall RoActivateInstance(ptr ptr)
@ stub RoCaptureErrorContext
@ stub RoClearError
@ stub RoFailFastWithErrorContext
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
index a2d62520..a272d2c 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -15,12 +15,14 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-
+#define COBJMACROS
#include "objbase.h"
+#include "initguid.h"
#include "roapi.h"
#include "roparameterizediid.h"
#include "hstring.h"
+
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(combase);
@@ -69,3 +71,23 @@ HRESULT WINAPI RoGetParameterizedTypeInstanceIID(UINT32 name_element_count, cons
if (hiid) *hiid = INVALID_HANDLE_VALUE;
return E_NOTIMPL;
}
+
+/***********************************************************************
+ * RoActivateInstance (combase.@)
+ */
+HRESULT WINAPI RoActivateInstance(HSTRING classid, IInspectable **instance)
+{
+ IActivationFactory *factory;
+ HRESULT hr;
+
+ FIXME("(%p, %p): semi-stub\n", classid, instance);
+
+ hr = RoGetActivationFactory(classid, &IID_IActivationFactory, (void **)&factory);
+ if (SUCCEEDED(hr))
+ {
+ hr = IActivationFactory_ActivateInstance(factory, instance);
+ IActivationFactory_Release(factory);
+ }
+
+ return hr;
+}
--
1.9.1