Added combase-CoCreateInstanceFromApp patchset

This commit is contained in:
Alistair Leslie-Hughes 2020-09-09 11:51:35 +10:00
parent 5e685d6df9
commit 5969ae1e56
3 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,90 @@
From 742a0e44027d4893d5a7a39f81ad0a8518ae3ceb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Tue, 8 Sep 2020 19:17:01 +0200
Subject: [PATCH] combase: Implement CoCreateInstanceFromApp semi-stub.
Flight Simulator calls it (a lot) to create WICImagingFactory2 objects.
---
.../api-ms-win-core-com-l1-1-0.spec | 2 +-
.../api-ms-win-core-com-l1-1-1.spec | 2 +-
dlls/combase/combase.c | 11 +++++++++++
dlls/combase/combase.spec | 2 +-
dlls/ole32/ole32.spec | 1 +
5 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-core-com-l1-1-0/api-ms-win-core-com-l1-1-0.spec b/dlls/api-ms-win-core-com-l1-1-0/api-ms-win-core-com-l1-1-0.spec
index eb81d238550..f5be6d88c75 100644
--- a/dlls/api-ms-win-core-com-l1-1-0/api-ms-win-core-com-l1-1-0.spec
+++ b/dlls/api-ms-win-core-com-l1-1-0/api-ms-win-core-com-l1-1-0.spec
@@ -8,7 +8,7 @@
@ stdcall CoCreateGuid(ptr) ole32.CoCreateGuid
@ stdcall CoCreateInstance(ptr ptr long ptr ptr) ole32.CoCreateInstance
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) ole32.CoCreateInstanceEx
-@ stub CoCreateInstanceFromApp
+@ stdcall CoCreateInstanceFromApp(ptr ptr long ptr long ptr) ole32.CoCreateInstanceFromApp
@ stub CoDecodeProxy
@ stdcall CoDecrementMTAUsage(ptr) ole32.CoDecrementMTAUsage
@ stdcall CoDisableCallCancellation(ptr) ole32.CoDisableCallCancellation
diff --git a/dlls/api-ms-win-core-com-l1-1-1/api-ms-win-core-com-l1-1-1.spec b/dlls/api-ms-win-core-com-l1-1-1/api-ms-win-core-com-l1-1-1.spec
index 6c3115d6007..f443592db3b 100644
--- a/dlls/api-ms-win-core-com-l1-1-1/api-ms-win-core-com-l1-1-1.spec
+++ b/dlls/api-ms-win-core-com-l1-1-1/api-ms-win-core-com-l1-1-1.spec
@@ -8,7 +8,7 @@
@ stdcall CoCreateGuid(ptr) ole32.CoCreateGuid
@ stdcall CoCreateInstance(ptr ptr long ptr ptr) ole32.CoCreateInstance
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) ole32.CoCreateInstanceEx
-@ stub CoCreateInstanceFromApp
+@ stdcall CoCreateInstanceFromApp(ptr ptr long ptr long ptr) ole32.CoCreateInstanceFromApp
@ stub CoDecodeProxy
@ stdcall CoDecrementMTAUsage(ptr) ole32.CoDecrementMTAUsage
@ stdcall CoDisableCallCancellation(ptr) ole32.CoDisableCallCancellation
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c
index c90cba6185c..e6d582bfc56 100644
--- a/dlls/combase/combase.c
+++ b/dlls/combase/combase.c
@@ -1570,6 +1570,17 @@ HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstanceEx(REFCLSID rclsid, IUnknown *o
return return_multi_qi(unk, count, results, TRUE);
}
+/***********************************************************************
+ * CoCreateInstanceFromApp [OLE32.@]
+ */
+HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstanceFromApp(REFCLSID rclsid, IUnknown *outer,
+ DWORD cls_context, void *reserved, DWORD count, MULTI_QI *results)
+{
+ static int once;
+ if (!once++) FIXME("%s, %p, %#x, %p, %u, %p semi-stub\n", debugstr_guid(rclsid), outer, cls_context, reserved, count, results);
+ return CoCreateInstanceEx(rclsid, outer, cls_context, NULL, count, results);
+}
+
/***********************************************************************
* CoGetClassObject (combase.@)
*/
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
index 9d9b34640be..6e74cca1f24 100644
--- a/dlls/combase/combase.spec
+++ b/dlls/combase/combase.spec
@@ -82,7 +82,7 @@
@ stdcall CoCreateGuid(ptr)
@ stdcall CoCreateInstance(ptr ptr long ptr ptr)
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr)
-@ stub CoCreateInstanceFromApp
+@ stdcall CoCreateInstanceFromApp(ptr ptr long ptr long ptr)
@ stub CoCreateObjectInContext
@ stub CoDeactivateObject
@ stub CoDecodeProxy
diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec
index a6f62ebfa99..8e73fdd16b4 100644
--- a/dlls/ole32/ole32.spec
+++ b/dlls/ole32/ole32.spec
@@ -14,6 +14,7 @@
@ stdcall CoCreateGuid(ptr) combase.CoCreateGuid
@ stdcall CoCreateInstance(ptr ptr long ptr ptr) combase.CoCreateInstance
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) combase.CoCreateInstanceEx
+@ stdcall CoCreateInstanceFromApp(ptr ptr long ptr long ptr) combase.CoCreateInstanceFromApp
@ stdcall CoDecrementMTAUsage(ptr) combase.CoDecrementMTAUsage
@ stdcall CoDisableCallCancellation(ptr) combase.CoDisableCallCancellation
@ stdcall CoDisconnectObject(ptr long) combase.CoDisconnectObject
--
2.28.0

View File

@ -0,0 +1 @@
Fixes: [49740] combase: Implement CoCreateInstanceFromApp semi-stub.

View File

@ -91,6 +91,7 @@ patch_enable_all ()
enable_atl_AtlAxDialogBox="$1"
enable_bcrypt_ECDHSecretAgreement="$1"
enable_cmd_launch_association="$1"
enable_combase_CoCreateInstanceFromApp="$1"
enable_comctl32_Listview_DrawItem="$1"
enable_comctl32_rebar_capture="$1"
enable_comctl32_version_6="$1"
@ -367,6 +368,9 @@ patch_enable ()
cmd-launch-association)
enable_cmd_launch_association="$2"
;;
combase-CoCreateInstanceFromApp)
enable_combase_CoCreateInstanceFromApp="$2"
;;
comctl32-Listview_DrawItem)
enable_comctl32_Listview_DrawItem="$2"
;;
@ -1883,6 +1887,18 @@ if test "$enable_cmd_launch_association" -eq 1; then
patch_apply cmd-launch-association/0002-cmd-ftype-failed-to-clear-file-associations.patch
fi
# Patchset combase-CoCreateInstanceFromApp
# |
# | This patchset fixes the following Wine bugs:
# | * [#49740] combase: Implement CoCreateInstanceFromApp semi-stub.
# |
# | Modified files:
# | * dlls/combase/combase.c, dlls/combase/combase.spec, dlls/ole32/ole32.spec
# |
if test "$enable_combase_CoCreateInstanceFromApp" -eq 1; then
patch_apply combase-CoCreateInstanceFromApp/0001-combase-Implement-CoCreateInstanceFromApp-semi-stub.patch
fi
# Patchset comctl32-Listview_DrawItem
# |
# | This patchset fixes the following Wine bugs: