Module: wine Branch: master Commit: 6187e8db0ba73b580c50c9068184d737ed6a1634 URL: https://source.winehq.org/git/wine.git/?a=commit;h=6187e8db0ba73b580c50c9068...
Author: Alex Henrie alexhenrie24@gmail.com Date: Tue Jul 10 11:45:46 2018 +0200
ole32: Return IUnknown from GITCF_CreateInstance if requested.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ole32/git.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/ole32/git.c b/dlls/ole32/git.c index f7a0460..8683f35 100644 --- a/dlls/ole32/git.c +++ b/dlls/ole32/git.c @@ -122,9 +122,14 @@ StdGlobalInterfaceTable_QueryInterface(IGlobalInterfaceTable* iface, /* Do we implement that interface? */ if (IsEqualIID(&IID_IUnknown, riid) || IsEqualIID(&IID_IGlobalInterfaceTable, riid)) + { *ppvObject = iface; + } else + { + FIXME("(%s), not supported.\n", debugstr_guid(riid)); return E_NOINTERFACE; + }
/* Now inc the refcount */ IGlobalInterfaceTable_AddRef(iface); @@ -314,13 +319,10 @@ static HRESULT WINAPI GITCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnk, REFIID riid, LPVOID *ppv) { - if (IsEqualIID(riid,&IID_IGlobalInterfaceTable)) { - IGlobalInterfaceTable *git = get_std_git(); - return IGlobalInterfaceTable_QueryInterface(git, riid, ppv); - } - - FIXME("(%s), not supported.\n",debugstr_guid(riid)); - return E_NOINTERFACE; + IGlobalInterfaceTable *git = get_std_git(); + HRESULT hr = IGlobalInterfaceTable_QueryInterface(git, riid, ppv); + IGlobalInterfaceTable_Release(git); + return hr; }
static HRESULT WINAPI GITCF_LockServer(LPCLASSFACTORY iface, BOOL fLock)