shdocvw: Fix module ref counting.
This commit is contained in:
parent
d7e88ff996
commit
0197c2c292
|
@ -54,6 +54,7 @@ static HRESULT WINAPI WBCF_QueryInterface(LPCLASSFACTORY iface,
|
||||||
|
|
||||||
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) {
|
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) {
|
||||||
*ppobj = iface;
|
*ppobj = iface;
|
||||||
|
IClassFactory_AddRef(iface);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,10 @@ static HRESULT WINAPI UrlHistoryStg_QueryInterface(IUrlHistoryStg2 *iface, REFII
|
||||||
*ppv = iface;
|
*ppv = iface;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(*ppv)
|
if(*ppv) {
|
||||||
|
IUnknown_AddRef((IUnknown*)*ppv);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
WARN("(%s %p)\n", debugstr_guid(riid), ppv);
|
WARN("(%s %p)\n", debugstr_guid(riid), ppv);
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
|
@ -47,11 +48,13 @@ static HRESULT WINAPI UrlHistoryStg_QueryInterface(IUrlHistoryStg2 *iface, REFII
|
||||||
|
|
||||||
static ULONG WINAPI UrlHistoryStg_AddRef(IUrlHistoryStg2 *iface)
|
static ULONG WINAPI UrlHistoryStg_AddRef(IUrlHistoryStg2 *iface)
|
||||||
{
|
{
|
||||||
|
SHDOCVW_LockModule();
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI UrlHistoryStg_Release(IUrlHistoryStg2 *iface)
|
static ULONG WINAPI UrlHistoryStg_Release(IUrlHistoryStg2 *iface)
|
||||||
{
|
{
|
||||||
|
SHDOCVW_UnlockModule();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue