Use sink in navigate_complete instead of ClientSite's IDispatch.
This commit is contained in:
parent
f702794f35
commit
356174019e
|
@ -27,17 +27,13 @@ static ATOM doc_view_atom = 0;
|
||||||
|
|
||||||
static void navigate_complete(WebBrowser *This)
|
static void navigate_complete(WebBrowser *This)
|
||||||
{
|
{
|
||||||
IDispatch *disp, *docdisp = NULL;
|
IDispatch *disp = NULL;
|
||||||
DISPPARAMS dispparams;
|
DISPPARAMS dispparams;
|
||||||
VARIANTARG params[2];
|
VARIANTARG params[2];
|
||||||
VARIANT url;
|
VARIANT url;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
hres = IOleClientSite_QueryInterface(This->client, &IID_IDispatch, (void**)&disp);
|
hres = IUnknown_QueryInterface(This->document, &IID_IDispatch, (void**)&disp);
|
||||||
if(FAILED(hres))
|
|
||||||
return;
|
|
||||||
|
|
||||||
hres = IUnknown_QueryInterface(This->document, &IID_IDispatch, (void**)&docdisp);
|
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
FIXME("Could not get IDispatch interface\n");
|
FIXME("Could not get IDispatch interface\n");
|
||||||
|
|
||||||
|
@ -50,19 +46,16 @@ static void navigate_complete(WebBrowser *This)
|
||||||
V_BYREF(params) = &url;
|
V_BYREF(params) = &url;
|
||||||
|
|
||||||
V_VT(params+1) = VT_DISPATCH;
|
V_VT(params+1) = VT_DISPATCH;
|
||||||
V_DISPATCH(params+1) = docdisp;
|
V_DISPATCH(params+1) = disp;
|
||||||
|
|
||||||
V_VT(&url) = VT_BSTR;
|
V_VT(&url) = VT_BSTR;
|
||||||
V_BSTR(&url) = This->url;
|
V_BSTR(&url) = This->url;
|
||||||
|
|
||||||
IDispatch_Invoke(disp, DISPID_NAVIGATECOMPLETE2, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
call_sink(This->cp_wbe2, DISPID_NAVIGATECOMPLETE2, &dispparams);
|
||||||
DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
|
call_sink(This->cp_wbe2, DISPID_DOCUMENTCOMPLETE, &dispparams);
|
||||||
IDispatch_Invoke(disp, DISPID_DOCUMENTCOMPLETE, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
|
||||||
DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
|
|
||||||
|
|
||||||
IDispatch_Release(disp);
|
if(disp)
|
||||||
if(docdisp)
|
IDispatch_Release(disp);
|
||||||
IDispatch_Release(docdisp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static LRESULT navigate2(WebBrowser *This)
|
static LRESULT navigate2(WebBrowser *This)
|
||||||
|
|
Loading…
Reference in New Issue