wine-staging/patches/combase-RoApi/0004-combase-Implement-RoActivateInstance.patch

66 lines
2.3 KiB
Diff

From c78968d3484d613945a0ee33eeb4df5d96a7c406 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: 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 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 5082f39..9b1ab30 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 6fd4df5..695b6fd 100644
--- a/dlls/combase/roapi.c
+++ b/dlls/combase/roapi.c
@@ -184,3 +184,23 @@ done:
if (module) FreeLibrary(module);
return hr;
}
+
+/***********************************************************************
+ * RoActivateInstance (combase.@)
+ */
+HRESULT WINAPI RoActivateInstance(HSTRING classid, IInspectable **instance)
+{
+ IActivationFactory *factory;
+ HRESULT hr;
+
+ FIXME("(%s, %p): semi-stub\n", debugstr_hstring(classid), instance);
+
+ hr = RoGetActivationFactory(classid, &IID_IActivationFactory, (void **)&factory);
+ if (SUCCEEDED(hr))
+ {
+ hr = IActivationFactory_ActivateInstance(factory, instance);
+ IActivationFactory_Release(factory);
+ }
+
+ return hr;
+}
--
2.6.4