wine-staging/patches/combase-RoApi/0004-combase-Implement-RoActivateInstance.patch
2018-04-08 11:09:31 +10:00

66 lines
2.4 KiB
Diff

From 4707618a4e4d1ecb55362e95052465266055eada 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] combase: Implement RoActivateInstance.
---
.../api-ms-win-core-winrt-l1-1-0.spec | 2 +-
dlls/combase/combase.spec | 2 +-
dlls/combase/roapi.c | 20 ++++++++++++++++++++
3 files changed, 22 insertions(+), 2 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 74c9d27aae3..978c3dc6d07 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 c238eb82db7..f42bdae605b 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 f7862fb774a..bfd07fb3f4e 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -198,3 +198,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;
+}
--
2.16.3