[PATCH v2 4/8] dllhost: Implement IClassFactory::CreateInstance().
Dmitry Timoshkov
dmitry at baikal.ru
Tue Feb 22 08:50:07 CST 2022
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
programs/dllhost/dllhost.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/programs/dllhost/dllhost.c b/programs/dllhost/dllhost.c
index 5c0a93c9a71..24e1242d78b 100644
--- a/programs/dllhost/dllhost.c
+++ b/programs/dllhost/dllhost.c
@@ -98,8 +98,14 @@ static ULONG WINAPI factory_Release(IClassFactory *iface)
static HRESULT WINAPI factory_CreateInstance(IClassFactory *iface,
IUnknown *punkouter, REFIID iid, void **ppv)
{
- FIXME("(%p,%p,%s,%p): stub\n", iface, punkouter, wine_dbgstr_guid(iid), ppv);
- return E_NOTIMPL;
+ struct factory *factory = impl_from_IClassFactory(iface);
+
+ TRACE("(%p,%p,%s,%p)\n", iface, punkouter, wine_dbgstr_guid(iid), ppv);
+
+ if (punkouter)
+ return CLASS_E_NOAGGREGATION;
+
+ return CoGetClassObject(&factory->clsid, CLSCTX_INPROC_SERVER, NULL, iid, ppv);
}
static HRESULT WINAPI factory_LockServer(IClassFactory *iface, BOOL lock)
--
2.35.1
More information about the wine-devel
mailing list