Commit 4ca6e39f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

msxml3: Store xmlnode pointer in dom_pi.

parent 2ed84025
...@@ -41,8 +41,7 @@ typedef struct _dom_pi ...@@ -41,8 +41,7 @@ typedef struct _dom_pi
{ {
const struct IXMLDOMProcessingInstructionVtbl *lpVtbl; const struct IXMLDOMProcessingInstructionVtbl *lpVtbl;
LONG ref; LONG ref;
IUnknown *node_unk; xmlnode *node;
IXMLDOMNode *node;
} dom_pi; } dom_pi;
static inline dom_pi *impl_from_IXMLDOMProcessingInstruction( IXMLDOMProcessingInstruction *iface ) static inline dom_pi *impl_from_IXMLDOMProcessingInstruction( IXMLDOMProcessingInstruction *iface )
...@@ -66,7 +65,7 @@ static HRESULT WINAPI dom_pi_QueryInterface( ...@@ -66,7 +65,7 @@ static HRESULT WINAPI dom_pi_QueryInterface(
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) ) else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{ {
return IUnknown_QueryInterface(This->node_unk, riid, ppvObject); *ppvObject = IXMLDOMNode_from_impl(This->node);
} }
else else
{ {
...@@ -74,8 +73,7 @@ static HRESULT WINAPI dom_pi_QueryInterface( ...@@ -74,8 +73,7 @@ static HRESULT WINAPI dom_pi_QueryInterface(
return E_NOINTERFACE; return E_NOINTERFACE;
} }
IXMLDOMProcessingInstruction_AddRef( iface ); IUnknown_AddRef((IUnknown*)*ppvObject);
return S_OK; return S_OK;
} }
...@@ -95,7 +93,7 @@ static ULONG WINAPI dom_pi_Release( ...@@ -95,7 +93,7 @@ static ULONG WINAPI dom_pi_Release(
ref = InterlockedDecrement( &This->ref ); ref = InterlockedDecrement( &This->ref );
if ( ref == 0 ) if ( ref == 0 )
{ {
IUnknown_Release( This->node_unk ); IXMLDOMNode_Release(IXMLDOMNode_from_impl(This->node));
HeapFree( GetProcessHeap(), 0, This ); HeapFree( GetProcessHeap(), 0, This );
} }
...@@ -184,7 +182,7 @@ static HRESULT WINAPI dom_pi_get_nodeName( ...@@ -184,7 +182,7 @@ static HRESULT WINAPI dom_pi_get_nodeName(
BSTR* p ) BSTR* p )
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_nodeName( This->node, p ); return IXMLDOMNode_get_nodeName( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_get_nodeValue( static HRESULT WINAPI dom_pi_get_nodeValue(
...@@ -192,7 +190,7 @@ static HRESULT WINAPI dom_pi_get_nodeValue( ...@@ -192,7 +190,7 @@ static HRESULT WINAPI dom_pi_get_nodeValue(
VARIANT* var1 ) VARIANT* var1 )
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_nodeValue( This->node, var1 ); return IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(This->node), var1 );
} }
static HRESULT WINAPI dom_pi_put_nodeValue( static HRESULT WINAPI dom_pi_put_nodeValue(
...@@ -219,7 +217,7 @@ static HRESULT WINAPI dom_pi_put_nodeValue( ...@@ -219,7 +217,7 @@ static HRESULT WINAPI dom_pi_put_nodeValue(
SysFreeString(sTarget); SysFreeString(sTarget);
} }
return IXMLDOMNode_put_nodeValue( This->node, var1 ); return IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(This->node), var1 );
} }
static HRESULT WINAPI dom_pi_get_nodeType( static HRESULT WINAPI dom_pi_get_nodeType(
...@@ -227,7 +225,7 @@ static HRESULT WINAPI dom_pi_get_nodeType( ...@@ -227,7 +225,7 @@ static HRESULT WINAPI dom_pi_get_nodeType(
DOMNodeType* domNodeType ) DOMNodeType* domNodeType )
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_nodeType( This->node, domNodeType ); return IXMLDOMNode_get_nodeType( IXMLDOMNode_from_impl(This->node), domNodeType );
} }
static HRESULT WINAPI dom_pi_get_parentNode( static HRESULT WINAPI dom_pi_get_parentNode(
...@@ -235,7 +233,7 @@ static HRESULT WINAPI dom_pi_get_parentNode( ...@@ -235,7 +233,7 @@ static HRESULT WINAPI dom_pi_get_parentNode(
IXMLDOMNode** parent ) IXMLDOMNode** parent )
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_parentNode( This->node, parent ); return IXMLDOMNode_get_parentNode( IXMLDOMNode_from_impl(This->node), parent );
} }
static HRESULT WINAPI dom_pi_get_childNodes( static HRESULT WINAPI dom_pi_get_childNodes(
...@@ -243,7 +241,7 @@ static HRESULT WINAPI dom_pi_get_childNodes( ...@@ -243,7 +241,7 @@ static HRESULT WINAPI dom_pi_get_childNodes(
IXMLDOMNodeList** outList) IXMLDOMNodeList** outList)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_childNodes( This->node, outList ); return IXMLDOMNode_get_childNodes( IXMLDOMNode_from_impl(This->node), outList );
} }
static HRESULT WINAPI dom_pi_get_firstChild( static HRESULT WINAPI dom_pi_get_firstChild(
...@@ -251,7 +249,7 @@ static HRESULT WINAPI dom_pi_get_firstChild( ...@@ -251,7 +249,7 @@ static HRESULT WINAPI dom_pi_get_firstChild(
IXMLDOMNode** domNode) IXMLDOMNode** domNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_firstChild( This->node, domNode ); return IXMLDOMNode_get_firstChild( IXMLDOMNode_from_impl(This->node), domNode );
} }
static HRESULT WINAPI dom_pi_get_lastChild( static HRESULT WINAPI dom_pi_get_lastChild(
...@@ -259,7 +257,7 @@ static HRESULT WINAPI dom_pi_get_lastChild( ...@@ -259,7 +257,7 @@ static HRESULT WINAPI dom_pi_get_lastChild(
IXMLDOMNode** domNode) IXMLDOMNode** domNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_lastChild( This->node, domNode ); return IXMLDOMNode_get_lastChild( IXMLDOMNode_from_impl(This->node), domNode );
} }
static HRESULT WINAPI dom_pi_get_previousSibling( static HRESULT WINAPI dom_pi_get_previousSibling(
...@@ -267,7 +265,7 @@ static HRESULT WINAPI dom_pi_get_previousSibling( ...@@ -267,7 +265,7 @@ static HRESULT WINAPI dom_pi_get_previousSibling(
IXMLDOMNode** domNode) IXMLDOMNode** domNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_previousSibling( This->node, domNode ); return IXMLDOMNode_get_previousSibling( IXMLDOMNode_from_impl(This->node), domNode );
} }
static HRESULT WINAPI dom_pi_get_nextSibling( static HRESULT WINAPI dom_pi_get_nextSibling(
...@@ -275,7 +273,7 @@ static HRESULT WINAPI dom_pi_get_nextSibling( ...@@ -275,7 +273,7 @@ static HRESULT WINAPI dom_pi_get_nextSibling(
IXMLDOMNode** domNode) IXMLDOMNode** domNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_nextSibling( This->node, domNode ); return IXMLDOMNode_get_nextSibling( IXMLDOMNode_from_impl(This->node), domNode );
} }
static HRESULT WINAPI dom_pi_get_attributes( static HRESULT WINAPI dom_pi_get_attributes(
...@@ -283,7 +281,7 @@ static HRESULT WINAPI dom_pi_get_attributes( ...@@ -283,7 +281,7 @@ static HRESULT WINAPI dom_pi_get_attributes(
IXMLDOMNamedNodeMap** attributeMap) IXMLDOMNamedNodeMap** attributeMap)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_attributes( This->node, attributeMap ); return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(This->node), attributeMap );
} }
static HRESULT WINAPI dom_pi_insertBefore( static HRESULT WINAPI dom_pi_insertBefore(
...@@ -292,7 +290,7 @@ static HRESULT WINAPI dom_pi_insertBefore( ...@@ -292,7 +290,7 @@ static HRESULT WINAPI dom_pi_insertBefore(
IXMLDOMNode** outOldNode) IXMLDOMNode** outOldNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_insertBefore( This->node, newNode, var1, outOldNode ); return IXMLDOMNode_insertBefore( IXMLDOMNode_from_impl(This->node), newNode, var1, outOldNode );
} }
static HRESULT WINAPI dom_pi_replaceChild( static HRESULT WINAPI dom_pi_replaceChild(
...@@ -302,7 +300,7 @@ static HRESULT WINAPI dom_pi_replaceChild( ...@@ -302,7 +300,7 @@ static HRESULT WINAPI dom_pi_replaceChild(
IXMLDOMNode** outOldNode) IXMLDOMNode** outOldNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_replaceChild( This->node, newNode, oldNode, outOldNode ); return IXMLDOMNode_replaceChild( IXMLDOMNode_from_impl(This->node), newNode, oldNode, outOldNode );
} }
static HRESULT WINAPI dom_pi_removeChild( static HRESULT WINAPI dom_pi_removeChild(
...@@ -310,7 +308,7 @@ static HRESULT WINAPI dom_pi_removeChild( ...@@ -310,7 +308,7 @@ static HRESULT WINAPI dom_pi_removeChild(
IXMLDOMNode* domNode, IXMLDOMNode** oldNode) IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_removeChild( This->node, domNode, oldNode ); return IXMLDOMNode_removeChild( IXMLDOMNode_from_impl(This->node), domNode, oldNode );
} }
static HRESULT WINAPI dom_pi_appendChild( static HRESULT WINAPI dom_pi_appendChild(
...@@ -318,7 +316,7 @@ static HRESULT WINAPI dom_pi_appendChild( ...@@ -318,7 +316,7 @@ static HRESULT WINAPI dom_pi_appendChild(
IXMLDOMNode* newNode, IXMLDOMNode** outNewNode) IXMLDOMNode* newNode, IXMLDOMNode** outNewNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_appendChild( This->node, newNode, outNewNode ); return IXMLDOMNode_appendChild( IXMLDOMNode_from_impl(This->node), newNode, outNewNode );
} }
static HRESULT WINAPI dom_pi_hasChildNodes( static HRESULT WINAPI dom_pi_hasChildNodes(
...@@ -326,7 +324,7 @@ static HRESULT WINAPI dom_pi_hasChildNodes( ...@@ -326,7 +324,7 @@ static HRESULT WINAPI dom_pi_hasChildNodes(
VARIANT_BOOL* pbool) VARIANT_BOOL* pbool)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_hasChildNodes( This->node, pbool ); return IXMLDOMNode_hasChildNodes( IXMLDOMNode_from_impl(This->node), pbool );
} }
static HRESULT WINAPI dom_pi_get_ownerDocument( static HRESULT WINAPI dom_pi_get_ownerDocument(
...@@ -334,7 +332,7 @@ static HRESULT WINAPI dom_pi_get_ownerDocument( ...@@ -334,7 +332,7 @@ static HRESULT WINAPI dom_pi_get_ownerDocument(
IXMLDOMDocument** domDocument) IXMLDOMDocument** domDocument)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_ownerDocument( This->node, domDocument ); return IXMLDOMNode_get_ownerDocument( IXMLDOMNode_from_impl(This->node), domDocument );
} }
static HRESULT WINAPI dom_pi_cloneNode( static HRESULT WINAPI dom_pi_cloneNode(
...@@ -342,7 +340,7 @@ static HRESULT WINAPI dom_pi_cloneNode( ...@@ -342,7 +340,7 @@ static HRESULT WINAPI dom_pi_cloneNode(
VARIANT_BOOL pbool, IXMLDOMNode** outNode) VARIANT_BOOL pbool, IXMLDOMNode** outNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_cloneNode( This->node, pbool, outNode ); return IXMLDOMNode_cloneNode( IXMLDOMNode_from_impl(This->node), pbool, outNode );
} }
static HRESULT WINAPI dom_pi_get_nodeTypeString( static HRESULT WINAPI dom_pi_get_nodeTypeString(
...@@ -350,7 +348,7 @@ static HRESULT WINAPI dom_pi_get_nodeTypeString( ...@@ -350,7 +348,7 @@ static HRESULT WINAPI dom_pi_get_nodeTypeString(
BSTR* p) BSTR* p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_nodeTypeString( This->node, p ); return IXMLDOMNode_get_nodeTypeString( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_get_text( static HRESULT WINAPI dom_pi_get_text(
...@@ -358,7 +356,7 @@ static HRESULT WINAPI dom_pi_get_text( ...@@ -358,7 +356,7 @@ static HRESULT WINAPI dom_pi_get_text(
BSTR* p) BSTR* p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_text( This->node, p ); return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_put_text( static HRESULT WINAPI dom_pi_put_text(
...@@ -366,7 +364,7 @@ static HRESULT WINAPI dom_pi_put_text( ...@@ -366,7 +364,7 @@ static HRESULT WINAPI dom_pi_put_text(
BSTR p) BSTR p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_put_text( This->node, p ); return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_get_specified( static HRESULT WINAPI dom_pi_get_specified(
...@@ -374,7 +372,7 @@ static HRESULT WINAPI dom_pi_get_specified( ...@@ -374,7 +372,7 @@ static HRESULT WINAPI dom_pi_get_specified(
VARIANT_BOOL* pbool) VARIANT_BOOL* pbool)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_specified( This->node, pbool ); return IXMLDOMNode_get_specified( IXMLDOMNode_from_impl(This->node), pbool );
} }
static HRESULT WINAPI dom_pi_get_definition( static HRESULT WINAPI dom_pi_get_definition(
...@@ -382,7 +380,7 @@ static HRESULT WINAPI dom_pi_get_definition( ...@@ -382,7 +380,7 @@ static HRESULT WINAPI dom_pi_get_definition(
IXMLDOMNode** domNode) IXMLDOMNode** domNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_definition( This->node, domNode ); return IXMLDOMNode_get_definition( IXMLDOMNode_from_impl(This->node), domNode );
} }
static HRESULT WINAPI dom_pi_get_nodeTypedValue( static HRESULT WINAPI dom_pi_get_nodeTypedValue(
...@@ -390,7 +388,7 @@ static HRESULT WINAPI dom_pi_get_nodeTypedValue( ...@@ -390,7 +388,7 @@ static HRESULT WINAPI dom_pi_get_nodeTypedValue(
VARIANT* var1) VARIANT* var1)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_nodeTypedValue( This->node, var1 ); return IXMLDOMNode_get_nodeTypedValue( IXMLDOMNode_from_impl(This->node), var1 );
} }
static HRESULT WINAPI dom_pi_put_nodeTypedValue( static HRESULT WINAPI dom_pi_put_nodeTypedValue(
...@@ -398,7 +396,7 @@ static HRESULT WINAPI dom_pi_put_nodeTypedValue( ...@@ -398,7 +396,7 @@ static HRESULT WINAPI dom_pi_put_nodeTypedValue(
VARIANT var1) VARIANT var1)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_put_nodeTypedValue( This->node, var1 ); return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(This->node), var1 );
} }
static HRESULT WINAPI dom_pi_get_dataType( static HRESULT WINAPI dom_pi_get_dataType(
...@@ -406,7 +404,7 @@ static HRESULT WINAPI dom_pi_get_dataType( ...@@ -406,7 +404,7 @@ static HRESULT WINAPI dom_pi_get_dataType(
VARIANT* var1) VARIANT* var1)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_dataType( This->node, var1 ); return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(This->node), var1 );
} }
static HRESULT WINAPI dom_pi_put_dataType( static HRESULT WINAPI dom_pi_put_dataType(
...@@ -414,7 +412,7 @@ static HRESULT WINAPI dom_pi_put_dataType( ...@@ -414,7 +412,7 @@ static HRESULT WINAPI dom_pi_put_dataType(
BSTR p) BSTR p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_put_dataType( This->node, p ); return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_get_xml( static HRESULT WINAPI dom_pi_get_xml(
...@@ -422,7 +420,7 @@ static HRESULT WINAPI dom_pi_get_xml( ...@@ -422,7 +420,7 @@ static HRESULT WINAPI dom_pi_get_xml(
BSTR* p) BSTR* p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_xml( This->node, p ); return IXMLDOMNode_get_xml( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_transformNode( static HRESULT WINAPI dom_pi_transformNode(
...@@ -430,7 +428,7 @@ static HRESULT WINAPI dom_pi_transformNode( ...@@ -430,7 +428,7 @@ static HRESULT WINAPI dom_pi_transformNode(
IXMLDOMNode* domNode, BSTR* p) IXMLDOMNode* domNode, BSTR* p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_transformNode( This->node, domNode, p ); return IXMLDOMNode_transformNode( IXMLDOMNode_from_impl(This->node), domNode, p );
} }
static HRESULT WINAPI dom_pi_selectNodes( static HRESULT WINAPI dom_pi_selectNodes(
...@@ -438,7 +436,7 @@ static HRESULT WINAPI dom_pi_selectNodes( ...@@ -438,7 +436,7 @@ static HRESULT WINAPI dom_pi_selectNodes(
BSTR p, IXMLDOMNodeList** outList) BSTR p, IXMLDOMNodeList** outList)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_selectNodes( This->node, p, outList ); return IXMLDOMNode_selectNodes( IXMLDOMNode_from_impl(This->node), p, outList );
} }
static HRESULT WINAPI dom_pi_selectSingleNode( static HRESULT WINAPI dom_pi_selectSingleNode(
...@@ -446,7 +444,7 @@ static HRESULT WINAPI dom_pi_selectSingleNode( ...@@ -446,7 +444,7 @@ static HRESULT WINAPI dom_pi_selectSingleNode(
BSTR p, IXMLDOMNode** outNode) BSTR p, IXMLDOMNode** outNode)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_selectSingleNode( This->node, p, outNode ); return IXMLDOMNode_selectSingleNode( IXMLDOMNode_from_impl(This->node), p, outNode );
} }
static HRESULT WINAPI dom_pi_get_parsed( static HRESULT WINAPI dom_pi_get_parsed(
...@@ -454,7 +452,7 @@ static HRESULT WINAPI dom_pi_get_parsed( ...@@ -454,7 +452,7 @@ static HRESULT WINAPI dom_pi_get_parsed(
VARIANT_BOOL* pbool) VARIANT_BOOL* pbool)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_parsed( This->node, pbool ); return IXMLDOMNode_get_parsed( IXMLDOMNode_from_impl(This->node), pbool );
} }
static HRESULT WINAPI dom_pi_get_namespaceURI( static HRESULT WINAPI dom_pi_get_namespaceURI(
...@@ -462,7 +460,7 @@ static HRESULT WINAPI dom_pi_get_namespaceURI( ...@@ -462,7 +460,7 @@ static HRESULT WINAPI dom_pi_get_namespaceURI(
BSTR* p) BSTR* p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_namespaceURI( This->node, p ); return IXMLDOMNode_get_namespaceURI( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_get_prefix( static HRESULT WINAPI dom_pi_get_prefix(
...@@ -470,7 +468,7 @@ static HRESULT WINAPI dom_pi_get_prefix( ...@@ -470,7 +468,7 @@ static HRESULT WINAPI dom_pi_get_prefix(
BSTR* p) BSTR* p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_prefix( This->node, p ); return IXMLDOMNode_get_prefix( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_get_baseName( static HRESULT WINAPI dom_pi_get_baseName(
...@@ -478,7 +476,7 @@ static HRESULT WINAPI dom_pi_get_baseName( ...@@ -478,7 +476,7 @@ static HRESULT WINAPI dom_pi_get_baseName(
BSTR* p) BSTR* p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_baseName( This->node, p ); return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_transformNodeToObject( static HRESULT WINAPI dom_pi_transformNodeToObject(
...@@ -486,7 +484,7 @@ static HRESULT WINAPI dom_pi_transformNodeToObject( ...@@ -486,7 +484,7 @@ static HRESULT WINAPI dom_pi_transformNodeToObject(
IXMLDOMNode* domNode, VARIANT var1) IXMLDOMNode* domNode, VARIANT var1)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_transformNodeToObject( This->node, domNode, var1 ); return IXMLDOMNode_transformNodeToObject( IXMLDOMNode_from_impl(This->node), domNode, var1 );
} }
static HRESULT WINAPI dom_pi_get_target( static HRESULT WINAPI dom_pi_get_target(
...@@ -495,7 +493,7 @@ static HRESULT WINAPI dom_pi_get_target( ...@@ -495,7 +493,7 @@ static HRESULT WINAPI dom_pi_get_target(
{ {
/* target returns the same value as nodeName property */ /* target returns the same value as nodeName property */
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_nodeName( This->node, p ); return IXMLDOMNode_get_nodeName( IXMLDOMNode_from_impl(This->node), p );
} }
static HRESULT WINAPI dom_pi_get_data( static HRESULT WINAPI dom_pi_get_data(
...@@ -509,7 +507,7 @@ static HRESULT WINAPI dom_pi_get_data( ...@@ -509,7 +507,7 @@ static HRESULT WINAPI dom_pi_get_data(
if(!p) if(!p)
return E_INVALIDARG; return E_INVALIDARG;
hr = IXMLDOMNode_get_nodeValue( This->node, &vRet ); hr = IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(This->node), &vRet );
if(hr == S_OK) if(hr == S_OK)
{ {
*p = V_BSTR(&vRet); *p = V_BSTR(&vRet);
...@@ -546,7 +544,7 @@ static HRESULT WINAPI dom_pi_put_data( ...@@ -546,7 +544,7 @@ static HRESULT WINAPI dom_pi_put_data(
V_VT(&val) = VT_BSTR; V_VT(&val) = VT_BSTR;
V_BSTR(&val) = data; V_BSTR(&val) = data;
hr = IXMLDOMNode_put_nodeValue( This->node, val ); hr = IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(This->node), val );
return hr; return hr;
} }
...@@ -605,7 +603,6 @@ static const struct IXMLDOMProcessingInstructionVtbl dom_pi_vtbl = ...@@ -605,7 +603,6 @@ static const struct IXMLDOMProcessingInstructionVtbl dom_pi_vtbl =
IUnknown* create_pi( xmlNodePtr pi ) IUnknown* create_pi( xmlNodePtr pi )
{ {
dom_pi *This; dom_pi *This;
xmlnode *node;
This = HeapAlloc( GetProcessHeap(), 0, sizeof *This ); This = HeapAlloc( GetProcessHeap(), 0, sizeof *This );
if ( !This ) if ( !This )
...@@ -614,16 +611,13 @@ IUnknown* create_pi( xmlNodePtr pi ) ...@@ -614,16 +611,13 @@ IUnknown* create_pi( xmlNodePtr pi )
This->lpVtbl = &dom_pi_vtbl; This->lpVtbl = &dom_pi_vtbl;
This->ref = 1; This->ref = 1;
node = create_basic_node( pi, (IUnknown*)&This->lpVtbl, NULL ); This->node = create_basic_node( pi, (IUnknown*)&This->lpVtbl, NULL );
if(!node) if(!This->node)
{ {
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
return NULL; return NULL;
} }
This->node_unk = (IUnknown*)&node->lpInternalUnkVtbl;
This->node = IXMLDOMNode_from_impl(node);
return (IUnknown*) &This->lpVtbl; return (IUnknown*) &This->lpVtbl;
} }
......
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