hlink: Return requested interface when creating IHlink instance.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2022-04-11 11:40:31 +03:00 committed by Alexandre Julliard
parent 759e2eff8b
commit bbb9c273d2
1 changed files with 5 additions and 2 deletions

View File

@ -1130,6 +1130,7 @@ static const IBindStatusCallbackVtbl bind_callback_vtbl =
HRESULT HLink_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv)
{
HlinkImpl * hl;
HRESULT hr;
TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid));
*ppv = NULL;
@ -1146,6 +1147,8 @@ HRESULT HLink_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv)
hl->IDataObject_iface.lpVtbl = &dovt;
hl->IBindStatusCallback_iface.lpVtbl = &bind_callback_vtbl;
*ppv = hl;
return S_OK;
hr = IHlink_QueryInterface(&hl->IHlink_iface, riid, ppv);
IHlink_Release(&hl->IHlink_iface);
return hr;
}