msxml3: Add IDispatchEx support to IXMLDOMDocument2.
This commit is contained in:
parent
c6a64414df
commit
954cb31448
|
@ -79,6 +79,7 @@ static REFIID tid_ids[] = {
|
||||||
&IID_IXMLDOMAttribute,
|
&IID_IXMLDOMAttribute,
|
||||||
&IID_IXMLDOMCDATASection,
|
&IID_IXMLDOMCDATASection,
|
||||||
&IID_IXMLDOMComment,
|
&IID_IXMLDOMComment,
|
||||||
|
&IID_IXMLDOMDocument,
|
||||||
&IID_IXMLDOMDocument2,
|
&IID_IXMLDOMDocument2,
|
||||||
&IID_IXMLDOMDocumentFragment,
|
&IID_IXMLDOMDocumentFragment,
|
||||||
&IID_IXMLDOMElement,
|
&IID_IXMLDOMElement,
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "shlwapi.h"
|
#include "shlwapi.h"
|
||||||
#include "ocidl.h"
|
#include "ocidl.h"
|
||||||
#include "objsafe.h"
|
#include "objsafe.h"
|
||||||
|
#include "dispex.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
@ -75,6 +76,9 @@ typedef struct _domdoc
|
||||||
|
|
||||||
/* IObjectSafety */
|
/* IObjectSafety */
|
||||||
DWORD safeopt;
|
DWORD safeopt;
|
||||||
|
|
||||||
|
/* IDispatchEx */
|
||||||
|
DispatchEx dispex;
|
||||||
} domdoc;
|
} domdoc;
|
||||||
|
|
||||||
static xmlDocPtr doparse( char *ptr, int len )
|
static xmlDocPtr doparse( char *ptr, int len )
|
||||||
|
@ -290,6 +294,10 @@ static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument2 *iface, REFIID rii
|
||||||
{
|
{
|
||||||
*ppvObject = (IObjectWithSite*)&(This->lpvtblIObjectWithSite);
|
*ppvObject = (IObjectWithSite*)&(This->lpvtblIObjectWithSite);
|
||||||
}
|
}
|
||||||
|
else if(dispex_query_interface(&This->dispex, riid, ppvObject))
|
||||||
|
{
|
||||||
|
return *ppvObject ? S_OK : E_NOINTERFACE;
|
||||||
|
}
|
||||||
else if(IsEqualGUID(&IID_IRunnableObject, riid))
|
else if(IsEqualGUID(&IID_IRunnableObject, riid))
|
||||||
{
|
{
|
||||||
TRACE("IID_IRunnableObject not supported returning NULL\n");
|
TRACE("IID_IRunnableObject not supported returning NULL\n");
|
||||||
|
@ -1967,6 +1975,20 @@ static const IObjectSafetyVtbl domdocObjectSafetyVtbl = {
|
||||||
xmldoc_Safety_SetInterfaceSafetyOptions
|
xmldoc_Safety_SetInterfaceSafetyOptions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static const tid_t domdoc_iface_tids[] = {
|
||||||
|
IXMLDOMNode_tid,
|
||||||
|
IXMLDOMDocument_tid,
|
||||||
|
IXMLDOMDocument2_tid,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
static dispex_static_data_t domdoc_dispex = {
|
||||||
|
NULL,
|
||||||
|
IXMLDOMDocument2_tid,
|
||||||
|
NULL,
|
||||||
|
domdoc_iface_tids
|
||||||
|
};
|
||||||
|
|
||||||
HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument2 **document)
|
HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument2 **document)
|
||||||
{
|
{
|
||||||
domdoc *doc;
|
domdoc *doc;
|
||||||
|
@ -2007,6 +2029,9 @@ HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument2 **docu
|
||||||
HeapFree( GetProcessHeap(), 0, doc );
|
HeapFree( GetProcessHeap(), 0, doc );
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init_dispex(&doc->dispex, (IUnknown*)&doc->lpVtbl, &domdoc_dispex);
|
||||||
|
|
||||||
/* The ref on doc->node is actually looped back into this object, so release it */
|
/* The ref on doc->node is actually looped back into this object, so release it */
|
||||||
IXMLDOMNode_Release(doc->node);
|
IXMLDOMNode_Release(doc->node);
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ typedef enum tid_t {
|
||||||
IXMLDOMAttribute_tid,
|
IXMLDOMAttribute_tid,
|
||||||
IXMLDOMCDATASection_tid,
|
IXMLDOMCDATASection_tid,
|
||||||
IXMLDOMComment_tid,
|
IXMLDOMComment_tid,
|
||||||
|
IXMLDOMDocument_tid,
|
||||||
IXMLDOMDocument2_tid,
|
IXMLDOMDocument2_tid,
|
||||||
IXMLDOMDocumentFragment_tid,
|
IXMLDOMDocumentFragment_tid,
|
||||||
IXMLDOMElement_tid,
|
IXMLDOMElement_tid,
|
||||||
|
|
Loading…
Reference in New Issue