Commit 746ffa65 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Use BindToStorage hack only for binding to IStream.

parent 5321c715
...@@ -493,10 +493,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToObject(IMoniker* iface, ...@@ -493,10 +493,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToObject(IMoniker* iface,
/****************************************************************************** /******************************************************************************
* URLMoniker_BindToStorage * URLMoniker_BindToStorage
******************************************************************************/ ******************************************************************************/
static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc, VOID** ppvObject)
IBindCtx* pbc,
REFIID riid,
VOID** ppvObject)
{ {
HRESULT hres; HRESULT hres;
BINDINFO bi; BINDINFO bi;
...@@ -505,12 +502,7 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, ...@@ -505,12 +502,7 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
Binding *bind; Binding *bind;
int len; int len;
WARN("(%s %p %s %p)\n", debugstr_w(URLName), pbc, debugstr_guid(riid), ppvObject); WARN("(%s %p %p)\n", debugstr_w(URLName), pbc, ppvObject);
if(!IsEqualIID(&IID_IStream, riid)) {
FIXME("unsupported iid\n");
return E_NOTIMPL;
}
bind = heap_alloc_zero(sizeof(Binding)); bind = heap_alloc_zero(sizeof(Binding));
bind->lpVtbl = &BindingVtbl; bind->lpVtbl = &BindingVtbl;
...@@ -741,10 +733,11 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface, ...@@ -741,10 +733,11 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface,
return E_FAIL; return E_FAIL;
} }
if(url.nScheme== INTERNET_SCHEME_HTTPS if(IsEqualGUID(&IID_IStream, riid) &&
|| url.nScheme== INTERNET_SCHEME_FTP ( url.nScheme == INTERNET_SCHEME_HTTPS
|| url.nScheme == INTERNET_SCHEME_GOPHER) || url.nScheme == INTERNET_SCHEME_FTP
return URLMonikerImpl_BindToStorage_hack(This->URLName, pbc, riid, ppvObject); || url.nScheme == INTERNET_SCHEME_GOPHER))
return URLMonikerImpl_BindToStorage_hack(This->URLName, pbc, ppvObject);
TRACE("(%p)->(%p %p %s %p)\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppvObject); TRACE("(%p)->(%p %p %s %p)\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppvObject);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment