http://bugs.winehq.org/show_bug.cgi?id=7448
------- Additional Comments From focht@gmx.net 2007-20-02 13:10 ------- Hello,
the patch indeed prevents the shdocvw module from being unloaded - a success so far. No crashes encountered yet.
The software seems to successfully download the stuff from private MS site. A progress bar is running and data is written. I cancelled the download of the .iso halfway so the initial bug reporter is not harmed at all. Any remaining steps should be left as an exercise to the initial bug reporter. If you encounter any additional problems/bugs, report back ...
A note regarding patch...
--- dlls/shdocvw/urlhist.c --- static ULONG WINAPI UrlHistoryStg_AddRef(IUrlHistoryStg2 *iface) { SHDOCVW_LockModule(); return 2; }
static ULONG WINAPI UrlHistoryStg_Release(IUrlHistoryStg2 *iface) { SHDOCVW_UnlockModule(); return 1; }
--- dlls/shdocvw/urlhist.c ---
Usually the class instance (impl) reference count is returned but in this case it's hard coded to "2" and "1". I wonder if there is any special meaning behind this?
Maybe if someone implements this one day, the real refcounts could be returned (like other code does):
--- sample code --- static ULONG WINAPI UrlHistoryStg_AddRef(IUrlHistoryStg2 *iface) { UrlHistoryStg *This = GET_URLHISTORYSTG_THIS( iface); ULONG cRef;
TRACE("(iface=%p)\n", iface);
cRef = InterlockedIncrement(&This->m_cRef);
if (cRef == 1) SHDOCVW_LockModule();
return cRef; }
static ULONG WINAPI UrlHistoryStg_Release(IUrlHistoryStg2 *iface) { UrlHistoryStg *This = GET_URLHISTORYSTG_THIS( iface); ULONG cRef;
TRACE("(iface=%p)\n", iface);
cRef = InterlockedDecrement(&This->m_cRef);
if (cRef == 0) { UrlHistoryStg_Destroy(This); SHDOCVW_UnlockModule(); }
return cRef; } --- sample code ---
Regards