diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 5504f6f2f4b..c969eae8750 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -1150,19 +1150,7 @@ static HRESULT WINAPI InternetBindInfo_GetBindInfo(IInternetBindInfo *iface, TRACE("(%p)->(%p %p)\n", This, grfBINDF, pbindinfo); *grfBINDF = This->bindf; - - *pbindinfo = This->bindinfo; - - if(pbindinfo->szExtraInfo || pbindinfo->szCustomVerb) - FIXME("copy strings\n"); - - if(pbindinfo->stgmedData.pUnkForRelease) - IUnknown_AddRef(pbindinfo->stgmedData.pUnkForRelease); - - if(pbindinfo->pUnk) - IUnknown_AddRef(pbindinfo->pUnk); - - return S_OK; + return CopyBindInfo(&This->bindinfo, pbindinfo); } static HRESULT WINAPI InternetBindInfo_GetBindString(IInternetBindInfo *iface, diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index b9291ac3743..f9e7cb575d4 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -640,6 +640,11 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl, return S_OK; } + memset(&bindinfo, 0, sizeof(bindinfo)); + bindinfo.cbSize = 0; + hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bind_info, &bindinfo); + ok(hres == E_INVALIDARG, "GetBindInfo returned: %08x, expected E_INVALIDARG\n", hres); + memset(&bindinfo, 0, sizeof(bindinfo)); bindinfo.cbSize = sizeof(bindinfo); hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bind_info, &bindinfo); diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h index 28723e14edd..391b1b34c4c 100644 --- a/dlls/urlmon/urlmon_main.h +++ b/dlls/urlmon/urlmon_main.h @@ -79,6 +79,8 @@ HRESULT bind_to_object(IMoniker*,IUri*,IBindCtx*,REFIID,void**ppv) DECLSPEC_HIDD HRESULT create_default_callback(IBindStatusCallback**) DECLSPEC_HIDDEN; HRESULT wrap_callback(IBindStatusCallback*,IBindStatusCallback**) DECLSPEC_HIDDEN; +HRESULT WINAPI CopyBindInfo(const BINDINFO *pcbiSrc, BINDINFO *pcbiDest) DECLSPEC_HIDDEN; + typedef struct ProtocolVtbl ProtocolVtbl; typedef struct {