ieframe: Added support for SID_SHTMLWindow in WebBrowser::QueryService.
This commit is contained in:
parent
0702d31c81
commit
39c1298958
|
@ -2697,21 +2697,25 @@ static void test_olecmd(IUnknown *unk, BOOL loaded)
|
||||||
static void test_IServiceProvider(IUnknown *unk)
|
static void test_IServiceProvider(IUnknown *unk)
|
||||||
{
|
{
|
||||||
IServiceProvider *servprov = (void*)0xdeadbeef;
|
IServiceProvider *servprov = (void*)0xdeadbeef;
|
||||||
|
IUnknown *iface;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
IUnknown *ret = NULL;
|
|
||||||
|
|
||||||
hres = IUnknown_QueryInterface(unk, &IID_IServiceProvider, (void**)&servprov);
|
hres = IUnknown_QueryInterface(unk, &IID_IServiceProvider, (void**)&servprov);
|
||||||
ok(hres == S_OK, "QueryInterface returned %08x, expected S_OK\n", hres);
|
ok(hres == S_OK, "QueryInterface returned %08x, expected S_OK\n", hres);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hres = IServiceProvider_QueryService(servprov, &SID_STopLevelBrowser, &IID_IBrowserService2, (LPVOID*)&ret);
|
hres = IServiceProvider_QueryService(servprov, &SID_STopLevelBrowser, &IID_IBrowserService2, (LPVOID*)&iface);
|
||||||
ok(hres == E_FAIL, "QueryService returned %08x, expected E_FAIL\n", hres);
|
ok(hres == E_FAIL, "QueryService returned %08x, expected E_FAIL\n", hres);
|
||||||
ok(ret == NULL, "ret returned %p, expected NULL\n", ret);
|
ok(!iface, "QueryService returned %p, expected NULL\n", iface);
|
||||||
if(hres == S_OK)
|
if(hres == S_OK)
|
||||||
{
|
IUnknown_Release(iface);
|
||||||
IUnknown_Release(ret);
|
|
||||||
}
|
hres = IServiceProvider_QueryService(servprov, &SID_SHTMLWindow, &IID_IHTMLWindow2, (LPVOID*)&iface);
|
||||||
|
ok(hres == S_OK, "QueryService returned %08x, expected S_OK\n", hres);
|
||||||
|
ok(iface != NULL, "QueryService returned NULL\n");
|
||||||
|
if(hres == S_OK)
|
||||||
|
IUnknown_Release(iface);
|
||||||
|
|
||||||
IServiceProvider_Release(servprov);
|
IServiceProvider_Release(servprov);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1143,16 +1143,19 @@ static HRESULT STDMETHODCALLTYPE WBServiceProvider_QueryService(IServiceProvider
|
||||||
{
|
{
|
||||||
WebBrowser *This = impl_from_IServiceProvider(iface);
|
WebBrowser *This = impl_from_IServiceProvider(iface);
|
||||||
|
|
||||||
if(*ppv)
|
if(IsEqualGUID(&SID_SHTMLWindow, riid)) {
|
||||||
ppv = NULL;
|
TRACE("(%p)->(SID_SHTMLWindow)\n", This);
|
||||||
|
return IHTMLWindow2_QueryInterface(&This->doc_host.html_window.IHTMLWindow2_iface, riid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
if(IsEqualGUID(&IID_IBrowserService2, riid)) {
|
if(IsEqualGUID(&IID_IBrowserService2, riid)) {
|
||||||
TRACE("(%p)->(IID_IBrowserService2 return E_FAIL)\n", This);
|
TRACE("(%p)->(IID_IBrowserService2 return E_FAIL)\n", This);
|
||||||
|
*ppv = NULL;
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
FIXME("(%p)->(%s, %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
|
FIXME("(%p)->(%s, %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
|
||||||
|
*ppv = NULL;
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue