Jacek Caban : shdocvw: Fix module ref counting.
Module: wine Branch: master Commit: 0197c2c2928eb6d6f4833243b96769f2151643ec URL: http://source.winehq.org/git/wine.git/?a=commit;h=0197c2c2928eb6d6f4833243b9... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Feb 20 17:13:27 2007 +0100 shdocvw: Fix module ref counting. --- dlls/shdocvw/factory.c | 1 + dlls/shdocvw/urlhist.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/shdocvw/factory.c b/dlls/shdocvw/factory.c index 71a37aa..58fffcb 100644 --- a/dlls/shdocvw/factory.c +++ b/dlls/shdocvw/factory.c @@ -54,6 +54,7 @@ static HRESULT WINAPI WBCF_QueryInterface(LPCLASSFACTORY iface, if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) { *ppobj = iface; + IClassFactory_AddRef(iface); return S_OK; } diff --git a/dlls/shdocvw/urlhist.c b/dlls/shdocvw/urlhist.c index 2b2e572..c801718 100644 --- a/dlls/shdocvw/urlhist.c +++ b/dlls/shdocvw/urlhist.c @@ -37,9 +37,10 @@ static HRESULT WINAPI UrlHistoryStg_QueryInterface(IUrlHistoryStg2 *iface, REFII *ppv = iface; } - if(*ppv) + if(*ppv) { + IUnknown_AddRef((IUnknown*)*ppv); return S_OK; - + } WARN("(%s %p)\n", debugstr_guid(riid), ppv); return E_NOINTERFACE; @@ -47,11 +48,13 @@ static HRESULT WINAPI UrlHistoryStg_QueryInterface(IUrlHistoryStg2 *iface, REFII static ULONG WINAPI UrlHistoryStg_AddRef(IUrlHistoryStg2 *iface) { + SHDOCVW_LockModule(); return 2; } static ULONG WINAPI UrlHistoryStg_Release(IUrlHistoryStg2 *iface) { + SHDOCVW_UnlockModule(); return 1; }
participants (1)
-
Alexandre Julliard