From 742a0e44027d4893d5a7a39f81ad0a8518ae3ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 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