mirror of
https://github.com/reactos/wine.git
synced 2025-02-10 14:23:52 +00:00
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_IXMLDOMCDATASection,
|
||||
&IID_IXMLDOMComment,
|
||||
&IID_IXMLDOMDocument,
|
||||
&IID_IXMLDOMDocument2,
|
||||
&IID_IXMLDOMDocumentFragment,
|
||||
&IID_IXMLDOMElement,
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "shlwapi.h"
|
||||
#include "ocidl.h"
|
||||
#include "objsafe.h"
|
||||
#include "dispex.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@ -75,6 +76,9 @@ typedef struct _domdoc
|
||||
|
||||
/* IObjectSafety */
|
||||
DWORD safeopt;
|
||||
|
||||
/* IDispatchEx */
|
||||
DispatchEx dispex;
|
||||
} domdoc;
|
||||
|
||||
static xmlDocPtr doparse( char *ptr, int len )
|
||||
@ -290,6 +294,10 @@ static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument2 *iface, REFIID rii
|
||||
{
|
||||
*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))
|
||||
{
|
||||
TRACE("IID_IRunnableObject not supported returning NULL\n");
|
||||
@ -1967,6 +1975,20 @@ static const IObjectSafetyVtbl domdocObjectSafetyVtbl = {
|
||||
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)
|
||||
{
|
||||
domdoc *doc;
|
||||
@ -2007,6 +2029,9 @@ HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument2 **docu
|
||||
HeapFree( GetProcessHeap(), 0, doc );
|
||||
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 */
|
||||
IXMLDOMNode_Release(doc->node);
|
||||
|
||||
|
@ -107,6 +107,7 @@ typedef enum tid_t {
|
||||
IXMLDOMAttribute_tid,
|
||||
IXMLDOMCDATASection_tid,
|
||||
IXMLDOMComment_tid,
|
||||
IXMLDOMDocument_tid,
|
||||
IXMLDOMDocument2_tid,
|
||||
IXMLDOMDocumentFragment_tid,
|
||||
IXMLDOMElement_tid,
|
||||
|
Loading…
x
Reference in New Issue
Block a user