Commit fe863e03 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Silence common invalid QueryInterface FIXME.

parent af3d19fa
......@@ -623,12 +623,18 @@ static IDispatchExVtbl DispatchExVtbl = {
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
{
static const IID IID_UndocumentedScriptIface =
{0x719c3050,0xf9d3,0x11cf,{0xa4,0x93,0x00,0x40,0x05,0x23,0xa8,0xa0}};
if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = DISPATCHEX(This);
}else if(IsEqualGUID(&IID_IDispatchEx, riid)) {
TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv);
*ppv = DISPATCHEX(This);
}else if(IsEqualGUID(&IID_UndocumentedScriptIface, riid)) {
TRACE("(%p)->(IID_UndocumentedScriptIface %p) returning NULL\n", This, ppv);
*ppv = NULL;
}else {
return FALSE;
}
......
......@@ -134,6 +134,8 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID
}else if(IsEqualGUID(&IID_IRunnableObject, riid)) {
TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This, ppvObject);
return E_NOINTERFACE;
}else if(dispex_query_interface(&This->dispex, riid, ppvObject)) {
return *ppvObject ? S_OK : E_NOINTERFACE;
}
if(*ppvObject) {
......
......@@ -61,6 +61,8 @@ static HRESULT WINAPI HTMLWindow2_QueryInterface(IHTMLWindow2 *iface, REFIID rii
}else if(IsEqualGUID(&IID_IHTMLWindow3, riid)) {
TRACE("(%p)->(IID_IHTMLWindow2 %p)\n", This, ppv);
*ppv = HTMLWINDOW3(This);
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
return *ppv ? S_OK : E_NOINTERFACE;
}
if(*ppv) {
......
......@@ -3701,20 +3701,28 @@ static void test_QueryInterface(IUnknown *unk)
IUnknown *qi;
HRESULT hres;
static const IID IID_UndocumentedScriptIface =
{0x719c3050,0xf9d3,0x11cf,{0xa4,0x93,0x00,0x40,0x05,0x23,0xa8,0xa0}};
qi = (void*)0xdeadbeef;
hres = IUnknown_QueryInterface(unk, &IID_IRunnableObject, (void**)&qi);
ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres);
ok(qi == NULL, "runnable=%p, ezpected NULL\n", qi);
ok(qi == NULL, "qirunnable=%p, ezpected NULL\n", qi);
qi = (void*)0xdeadbeef;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMNode, (void**)&qi);
ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres);
ok(qi == NULL, "runnable=%p, ezpected NULL\n", qi);
ok(qi == NULL, "qi=%p, ezpected NULL\n", qi);
qi = (void*)0xdeadbeef;
hres = IUnknown_QueryInterface(unk, &IID_IHTMLDOMNode2, (void**)&qi);
ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres);
ok(qi == NULL, "runnable=%p, ezpected NULL\n", qi);
ok(qi == NULL, "qi=%p, ezpected NULL\n", qi);
qi = (void*)0xdeadbeef;
hres = IUnknown_QueryInterface(unk, &IID_UndocumentedScriptIface, (void**)&qi);
ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres);
ok(qi == NULL, "qi=%p, ezpected NULL\n", qi);
}
static void init_test(enum load_state_t ls) {
......
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