urlmon: Use CopyBindInfo in InternetBindInfo_GetBindInfo.

This commit is contained in:
Piotr Caban 2012-03-08 13:45:51 +01:00 committed by Alexandre Julliard
parent 058b9dfbe2
commit bb06ec7789
3 changed files with 8 additions and 13 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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 {