Commit 947e8b01 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Use query_interface in the dispex vtbl for HTMLNamespaceCollection.

parent 2e023371
......@@ -2424,22 +2424,12 @@ static HRESULT WINAPI HTMLNamespaceCollection_QueryInterface(IHTMLNamespaceColle
{
HTMLNamespaceCollection *This = impl_from_IHTMLNamespaceCollection(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
if(IsEqualGUID(&IID_IUnknown, riid)) {
*ppv = &This->IHTMLNamespaceCollection_iface;
}else if(IsEqualGUID(&IID_IHTMLNamespaceCollection, riid)) {
*ppv = &This->IHTMLNamespaceCollection_iface;
}else if(dispex_query_interface(&This->dispex, riid, ppv)) {
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
}else {
WARN("Unsupported interface %s\n", debugstr_mshtml_guid(riid));
*ppv = NULL;
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
}
static ULONG WINAPI HTMLNamespaceCollection_AddRef(IHTMLNamespaceCollection *iface)
......@@ -2538,6 +2528,16 @@ static inline HTMLNamespaceCollection *HTMLNamespaceCollection_from_DispatchEx(D
return CONTAINING_RECORD(iface, HTMLNamespaceCollection, dispex);
}
static void *HTMLNamespaceCollection_query_interface(DispatchEx *dispex, REFIID riid)
{
HTMLNamespaceCollection *This = HTMLNamespaceCollection_from_DispatchEx(dispex);
if(IsEqualGUID(&IID_IHTMLNamespaceCollection, riid))
return &This->IHTMLNamespaceCollection_iface;
return NULL;
}
static void HTMLNamespaceCollection_destructor(DispatchEx *dispex)
{
HTMLNamespaceCollection *This = HTMLNamespaceCollection_from_DispatchEx(dispex);
......@@ -2545,6 +2545,7 @@ static void HTMLNamespaceCollection_destructor(DispatchEx *dispex)
}
static const dispex_static_data_vtbl_t HTMLNamespaceCollection_dispex_vtbl = {
.query_interface = HTMLNamespaceCollection_query_interface,
.destructor = HTMLNamespaceCollection_destructor,
};
......
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