ReactOS 0.4.15-dev-8349-g6f277e9
pi.c
Go to the documentation of this file.
1/*
2 * DOM processing instruction node implementation
3 *
4 * Copyright 2006 Huw Davies
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#define COBJMACROS
22
23#include "config.h"
24
25#include <stdarg.h>
26#ifdef HAVE_LIBXML2
27# include <libxml/parser.h>
28# include <libxml/xmlerror.h>
29#endif
30
31#include "windef.h"
32#include "winbase.h"
33#include "winuser.h"
34#include "ole2.h"
35#include "msxml6.h"
36
37#include "msxml_private.h"
38
39#include "wine/debug.h"
40
41#ifdef HAVE_LIBXML2
42
44
45typedef struct _dom_pi
46{
47 xmlnode node;
48 IXMLDOMProcessingInstruction IXMLDOMProcessingInstruction_iface;
49 LONG ref;
50} dom_pi;
51
52static const struct nodemap_funcs dom_pi_attr_map;
53
54static const tid_t dompi_se_tids[] = {
58};
59
60static inline dom_pi *impl_from_IXMLDOMProcessingInstruction( IXMLDOMProcessingInstruction *iface )
61{
62 return CONTAINING_RECORD(iface, dom_pi, IXMLDOMProcessingInstruction_iface);
63}
64
65static HRESULT WINAPI dom_pi_QueryInterface(
68 void** ppvObject )
69{
70 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
71 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
72
73 if ( IsEqualGUID( riid, &IID_IXMLDOMProcessingInstruction ) ||
74 IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
77 {
78 *ppvObject = iface;
79 }
80 else if(node_query_interface(&This->node, riid, ppvObject))
81 {
82 return *ppvObject ? S_OK : E_NOINTERFACE;
83 }
84 else if(IsEqualGUID( riid, &IID_ISupportErrorInfo ))
85 {
86 return node_create_supporterrorinfo(dompi_se_tids, ppvObject);
87 }
88 else
89 {
90 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
91 *ppvObject = NULL;
92 return E_NOINTERFACE;
93 }
94
95 IUnknown_AddRef((IUnknown*)*ppvObject);
96 return S_OK;
97}
98
99static ULONG WINAPI dom_pi_AddRef(
101{
102 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
104 TRACE("(%p)->(%d)\n", This, ref);
105 return ref;
106}
107
108static ULONG WINAPI dom_pi_Release(
110{
111 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
113
114 TRACE("(%p)->(%d)\n", This, ref);
115 if ( ref == 0 )
116 {
117 destroy_xmlnode(&This->node);
118 heap_free( This );
119 }
120
121 return ref;
122}
123
124static HRESULT WINAPI dom_pi_GetTypeInfoCount(
126 UINT* pctinfo )
127{
128 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
129 return IDispatchEx_GetTypeInfoCount(&This->node.dispex.IDispatchEx_iface, pctinfo);
130}
131
132static HRESULT WINAPI dom_pi_GetTypeInfo(
134 UINT iTInfo, LCID lcid,
135 ITypeInfo** ppTInfo )
136{
137 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
138 return IDispatchEx_GetTypeInfo(&This->node.dispex.IDispatchEx_iface,
139 iTInfo, lcid, ppTInfo);
140}
141
142static HRESULT WINAPI dom_pi_GetIDsOfNames(
144 REFIID riid, LPOLESTR* rgszNames,
145 UINT cNames, LCID lcid, DISPID* rgDispId )
146{
147 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
148 return IDispatchEx_GetIDsOfNames(&This->node.dispex.IDispatchEx_iface,
149 riid, rgszNames, cNames, lcid, rgDispId);
150}
151
152static HRESULT WINAPI dom_pi_Invoke(
154 DISPID dispIdMember, REFIID riid, LCID lcid,
155 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
156 EXCEPINFO* pExcepInfo, UINT* puArgErr )
157{
158 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
159 return IDispatchEx_Invoke(&This->node.dispex.IDispatchEx_iface,
160 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
161}
162
163static HRESULT WINAPI dom_pi_get_nodeName(
165 BSTR* p )
166{
167 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
168
169 TRACE("(%p)->(%p)\n", This, p);
170
171 return node_get_nodeName(&This->node, p);
172}
173
174static HRESULT WINAPI dom_pi_get_nodeValue(
176 VARIANT* value)
177{
178 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
179
180 TRACE("(%p)->(%p)\n", This, value);
181
182 return node_get_content(&This->node, value);
183}
184
185static HRESULT WINAPI dom_pi_put_nodeValue(
188{
189 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
190 BSTR target;
191 HRESULT hr;
192
193 TRACE("(%p)->(%s)\n", This, debugstr_variant(&value));
194
195 /* Cannot set data to a PI node whose target is 'xml' */
196 hr = IXMLDOMProcessingInstruction_get_nodeName(iface, &target);
197 if(hr == S_OK)
198 {
199 static const WCHAR xmlW[] = {'x','m','l',0};
200 if(!strcmpW(target, xmlW))
201 {
203 return E_FAIL;
204 }
205
207 }
208
209 return node_put_value(&This->node, &value);
210}
211
212static HRESULT WINAPI dom_pi_get_nodeType(
214 DOMNodeType* domNodeType )
215{
216 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
217
218 TRACE("(%p)->(%p)\n", This, domNodeType);
219
220 *domNodeType = NODE_PROCESSING_INSTRUCTION;
221 return S_OK;
222}
223
224static HRESULT WINAPI dom_pi_get_parentNode(
227{
228 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
229
230 TRACE("(%p)->(%p)\n", This, parent);
231
232 return node_get_parent(&This->node, parent);
233}
234
235static HRESULT WINAPI dom_pi_get_childNodes(
237 IXMLDOMNodeList** outList)
238{
239 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
240
241 TRACE("(%p)->(%p)\n", This, outList);
242
243 return node_get_child_nodes(&This->node, outList);
244}
245
246static HRESULT WINAPI dom_pi_get_firstChild(
248 IXMLDOMNode** domNode)
249{
250 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
251
252 TRACE("(%p)->(%p)\n", This, domNode);
253
254 return return_null_node(domNode);
255}
256
257static HRESULT WINAPI dom_pi_get_lastChild(
259 IXMLDOMNode** domNode)
260{
261 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
262
263 TRACE("(%p)->(%p)\n", This, domNode);
264
265 return return_null_node(domNode);
266}
267
268static HRESULT WINAPI dom_pi_get_previousSibling(
270 IXMLDOMNode** domNode)
271{
272 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
273
274 TRACE("(%p)->(%p)\n", This, domNode);
275
276 return node_get_previous_sibling(&This->node, domNode);
277}
278
279static HRESULT WINAPI dom_pi_get_nextSibling(
281 IXMLDOMNode** domNode)
282{
283 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
284
285 TRACE("(%p)->(%p)\n", This, domNode);
286
287 return node_get_next_sibling(&This->node, domNode);
288}
289
290static HRESULT WINAPI dom_pi_get_attributes(
293{
294 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
295 static const WCHAR xmlW[] = {'x','m','l',0};
296 HRESULT hr;
297 BSTR name;
298
299 TRACE("(%p)->(%p)\n", This, map);
300
301 if (!map) return E_INVALIDARG;
302
303 *map = NULL;
304
305 hr = node_get_nodeName(&This->node, &name);
306 if (hr != S_OK) return hr;
307
308 if (!strcmpW(name, xmlW))
309 {
310 FIXME("created dummy map for <?xml ?>\n");
311 *map = create_nodemap(This->node.node, &dom_pi_attr_map);
313 return S_OK;
314 }
315
317
318 return S_FALSE;
319}
320
321static HRESULT WINAPI dom_pi_insertBefore(
323 IXMLDOMNode* newNode, VARIANT refChild,
324 IXMLDOMNode** outOldNode)
325{
326 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
327
328 FIXME("(%p)->(%p %s %p) needs test\n", This, newNode, debugstr_variant(&refChild), outOldNode);
329
330 return node_insert_before(&This->node, newNode, &refChild, outOldNode);
331}
332
333static HRESULT WINAPI dom_pi_replaceChild(
335 IXMLDOMNode* newNode,
336 IXMLDOMNode* oldNode,
337 IXMLDOMNode** outOldNode)
338{
339 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
340
341 FIXME("(%p)->(%p %p %p) needs test\n", This, newNode, oldNode, outOldNode);
342
343 return node_replace_child(&This->node, newNode, oldNode, outOldNode);
344}
345
346static HRESULT WINAPI dom_pi_removeChild(
348 IXMLDOMNode *child, IXMLDOMNode **oldChild)
349{
350 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
351 TRACE("(%p)->(%p %p)\n", This, child, oldChild);
352 return node_remove_child(&This->node, child, oldChild);
353}
354
355static HRESULT WINAPI dom_pi_appendChild(
357 IXMLDOMNode *child, IXMLDOMNode **outChild)
358{
359 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
360 TRACE("(%p)->(%p %p)\n", This, child, outChild);
361 return node_append_child(&This->node, child, outChild);
362}
363
364static HRESULT WINAPI dom_pi_hasChildNodes(
367{
368 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
369 TRACE("(%p)->(%p)\n", This, ret);
370 return node_has_childnodes(&This->node, ret);
371}
372
373static HRESULT WINAPI dom_pi_get_ownerDocument(
375 IXMLDOMDocument **doc)
376{
377 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
378 TRACE("(%p)->(%p)\n", This, doc);
379 return node_get_owner_doc(&This->node, doc);
380}
381
382static HRESULT WINAPI dom_pi_cloneNode(
384 VARIANT_BOOL deep, IXMLDOMNode** outNode)
385{
386 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
387 TRACE("(%p)->(%d %p)\n", This, deep, outNode);
388 return node_clone( &This->node, deep, outNode );
389}
390
391static HRESULT WINAPI dom_pi_get_nodeTypeString(
393 BSTR* p)
394{
395 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
396 static const WCHAR processinginstructionW[] =
397 {'p','r','o','c','e','s','s','i','n','g','i','n','s','t','r','u','c','t','i','o','n',0};
398
399 TRACE("(%p)->(%p)\n", This, p);
400
401 return return_bstr(processinginstructionW, p);
402}
403
404static HRESULT WINAPI dom_pi_get_text(
406 BSTR* p)
407{
408 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
409 TRACE("(%p)->(%p)\n", This, p);
410 return node_get_text(&This->node, p);
411}
412
413static HRESULT WINAPI dom_pi_put_text(
415 BSTR p)
416{
417 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
418 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
419 return node_put_text( &This->node, p );
420}
421
422static HRESULT WINAPI dom_pi_get_specified(
424 VARIANT_BOOL* isSpecified)
425{
426 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
427 FIXME("(%p)->(%p) stub!\n", This, isSpecified);
428 *isSpecified = VARIANT_TRUE;
429 return S_OK;
430}
431
432static HRESULT WINAPI dom_pi_get_definition(
434 IXMLDOMNode** definitionNode)
435{
436 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
437 FIXME("(%p)->(%p)\n", This, definitionNode);
438 return E_NOTIMPL;
439}
440
441static HRESULT WINAPI dom_pi_get_nodeTypedValue(
443 VARIANT* v)
444{
445 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
446 TRACE("(%p)->(%p)\n", This, v);
447 return node_get_content(&This->node, v);
448}
449
450static HRESULT WINAPI dom_pi_put_nodeTypedValue(
452 VARIANT typedValue)
453{
454 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
455 FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue));
456 return E_NOTIMPL;
457}
458
459static HRESULT WINAPI dom_pi_get_dataType(
461 VARIANT* typename)
462{
463 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
464 TRACE("(%p)->(%p)\n", This, typename);
465 return return_null_var( typename );
466}
467
468static HRESULT WINAPI dom_pi_put_dataType(
470 BSTR p)
471{
472 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
473
474 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
475
476 if(!p)
477 return E_INVALIDARG;
478
479 return E_FAIL;
480}
481
482static HRESULT WINAPI dom_pi_get_xml(
484 BSTR* p)
485{
486 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
487
488 TRACE("(%p)->(%p)\n", This, p);
489
490 return node_get_xml(&This->node, FALSE, p);
491}
492
493static HRESULT WINAPI dom_pi_transformNode(
496{
497 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
498 TRACE("(%p)->(%p %p)\n", This, node, p);
499 return node_transform_node(&This->node, node, p);
500}
501
502static HRESULT WINAPI dom_pi_selectNodes(
504 BSTR p, IXMLDOMNodeList** outList)
505{
506 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
507 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
508 return node_select_nodes(&This->node, p, outList);
509}
510
511static HRESULT WINAPI dom_pi_selectSingleNode(
513 BSTR p, IXMLDOMNode** outNode)
514{
515 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
516 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode);
517 return node_select_singlenode(&This->node, p, outNode);
518}
519
520static HRESULT WINAPI dom_pi_get_parsed(
522 VARIANT_BOOL* isParsed)
523{
524 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
525 FIXME("(%p)->(%p) stub!\n", This, isParsed);
526 *isParsed = VARIANT_TRUE;
527 return S_OK;
528}
529
530static HRESULT WINAPI dom_pi_get_namespaceURI(
532 BSTR* p)
533{
534 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
535 TRACE("(%p)->(%p)\n", This, p);
536 return node_get_namespaceURI(&This->node, p);
537}
538
539static HRESULT WINAPI dom_pi_get_prefix(
541 BSTR* prefix)
542{
543 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
544 TRACE("(%p)->(%p)\n", This, prefix);
545 return return_null_bstr( prefix );
546}
547
548static HRESULT WINAPI dom_pi_get_baseName(
550 BSTR* name)
551{
552 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
553 TRACE("(%p)->(%p)\n", This, name);
554 return node_get_base_name( &This->node, name );
555}
556
557static HRESULT WINAPI dom_pi_transformNodeToObject(
559 IXMLDOMNode* domNode, VARIANT var1)
560{
561 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
562 FIXME("(%p)->(%p %s)\n", This, domNode, debugstr_variant(&var1));
563 return E_NOTIMPL;
564}
565
566static HRESULT WINAPI dom_pi_get_target(
568 BSTR *p)
569{
570 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
571
572 TRACE("(%p)->(%p)\n", This, p);
573
574 /* target returns the same value as nodeName property */
575 return node_get_nodeName(&This->node, p);
576}
577
578static HRESULT WINAPI dom_pi_get_data(
580 BSTR *p)
581{
582 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
583 HRESULT hr;
584 VARIANT ret;
585
586 TRACE("(%p)->(%p)\n", This, p);
587
588 if(!p)
589 return E_INVALIDARG;
590
591 hr = IXMLDOMProcessingInstruction_get_nodeValue( iface, &ret );
592 if(hr == S_OK)
593 {
594 *p = V_BSTR(&ret);
595 }
596
597 return hr;
598}
599
600static HRESULT WINAPI dom_pi_put_data(
602 BSTR data)
603{
604 dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
605 BSTR target;
606 HRESULT hr;
607
608 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
609
610 /* cannot set data to a PI node whose target is 'xml' */
611 hr = IXMLDOMProcessingInstruction_get_nodeName(iface, &target);
612 if(hr == S_OK)
613 {
614 static const WCHAR xmlW[] = {'x','m','l',0};
615 if(!strcmpW(target, xmlW))
616 {
618 return E_FAIL;
619 }
620
622 }
623
624 return node_set_content(&This->node, data);
625}
626
627static const struct IXMLDOMProcessingInstructionVtbl dom_pi_vtbl =
628{
629 dom_pi_QueryInterface,
630 dom_pi_AddRef,
631 dom_pi_Release,
632 dom_pi_GetTypeInfoCount,
633 dom_pi_GetTypeInfo,
634 dom_pi_GetIDsOfNames,
635 dom_pi_Invoke,
636 dom_pi_get_nodeName,
637 dom_pi_get_nodeValue,
638 dom_pi_put_nodeValue,
639 dom_pi_get_nodeType,
640 dom_pi_get_parentNode,
641 dom_pi_get_childNodes,
642 dom_pi_get_firstChild,
643 dom_pi_get_lastChild,
644 dom_pi_get_previousSibling,
645 dom_pi_get_nextSibling,
646 dom_pi_get_attributes,
647 dom_pi_insertBefore,
648 dom_pi_replaceChild,
649 dom_pi_removeChild,
650 dom_pi_appendChild,
651 dom_pi_hasChildNodes,
652 dom_pi_get_ownerDocument,
653 dom_pi_cloneNode,
654 dom_pi_get_nodeTypeString,
655 dom_pi_get_text,
656 dom_pi_put_text,
657 dom_pi_get_specified,
658 dom_pi_get_definition,
659 dom_pi_get_nodeTypedValue,
660 dom_pi_put_nodeTypedValue,
661 dom_pi_get_dataType,
662 dom_pi_put_dataType,
663 dom_pi_get_xml,
664 dom_pi_transformNode,
665 dom_pi_selectNodes,
666 dom_pi_selectSingleNode,
667 dom_pi_get_parsed,
668 dom_pi_get_namespaceURI,
669 dom_pi_get_prefix,
670 dom_pi_get_baseName,
671 dom_pi_transformNodeToObject,
672
673 dom_pi_get_target,
674 dom_pi_get_data,
675 dom_pi_put_data
676};
677
678static HRESULT dom_pi_get_qualified_item(const xmlNodePtr node, BSTR name, BSTR uri,
680{
681 FIXME("(%p)->(%s %s %p): stub\n", node, debugstr_w(name), debugstr_w(uri), item);
682 return E_NOTIMPL;
683}
684
685static HRESULT dom_pi_get_named_item(const xmlNodePtr node, BSTR name, IXMLDOMNode **item)
686{
687 FIXME("(%p)->(%s %p): stub\n", node, debugstr_w(name), item );
688 if (item)
689 *item = NULL;
690 return S_FALSE;
691}
692
693static HRESULT dom_pi_set_named_item(xmlNodePtr node, IXMLDOMNode *newItem, IXMLDOMNode **namedItem)
694{
695 FIXME("(%p)->(%p %p): stub\n", node, newItem, namedItem );
696 return E_NOTIMPL;
697}
698
699static HRESULT dom_pi_remove_qualified_item(xmlNodePtr node, BSTR name, BSTR uri, IXMLDOMNode **item)
700{
701 FIXME("(%p)->(%s %s %p): stub\n", node, debugstr_w(name), debugstr_w(uri), item);
702 return E_NOTIMPL;
703}
704
705static HRESULT dom_pi_remove_named_item(xmlNodePtr node, BSTR name, IXMLDOMNode **item)
706{
707 FIXME("(%p)->(%s %p): stub\n", node, debugstr_w(name), item);
708 return E_NOTIMPL;
709}
710
711static HRESULT dom_pi_get_item(const xmlNodePtr node, LONG index, IXMLDOMNode **item)
712{
713 FIXME("(%p)->(%d %p): stub\n", node, index, item);
714 return E_NOTIMPL;
715}
716
717static HRESULT dom_pi_get_length(const xmlNodePtr node, LONG *length)
718{
719 FIXME("(%p)->(%p): stub\n", node, length);
720
721 *length = 0;
722 return S_OK;
723}
724
725static HRESULT dom_pi_next_node(const xmlNodePtr node, LONG *iter, IXMLDOMNode **nextNode)
726{
727 FIXME("(%p)->(%d %p): stub\n", node, *iter, nextNode);
728 return E_NOTIMPL;
729}
730
731static const struct nodemap_funcs dom_pi_attr_map = {
732 dom_pi_get_named_item,
733 dom_pi_set_named_item,
734 dom_pi_remove_named_item,
735 dom_pi_get_item,
736 dom_pi_get_length,
737 dom_pi_get_qualified_item,
738 dom_pi_remove_qualified_item,
739 dom_pi_next_node
740};
741
742static const tid_t dompi_iface_tids[] = {
744 0
745};
746
747static dispex_static_data_t dompi_dispex = {
748 NULL,
750 NULL,
751 dompi_iface_tids
752};
753
754IUnknown* create_pi( xmlNodePtr pi )
755{
756 dom_pi *This;
757
758 This = heap_alloc( sizeof *This );
759 if ( !This )
760 return NULL;
761
762 This->IXMLDOMProcessingInstruction_iface.lpVtbl = &dom_pi_vtbl;
763 This->ref = 1;
764
765 init_xmlnode(&This->node, pi, (IXMLDOMNode*)&This->IXMLDOMProcessingInstruction_iface, &dompi_dispex);
766
767 return (IUnknown*)&This->IXMLDOMProcessingInstruction_iface;
768}
769
770#endif
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
const GUID IID_IUnknown
Definition: _map.h:48
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
OLECHAR * BSTR
Definition: compat.h:2293
short VARIANT_BOOL
Definition: compat.h:2290
r parent
Definition: btrfs.c:3010
unsigned short WORD
Definition: ntddk_ex.h:93
const GLdouble * v
Definition: gl.h:2040
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint index
Definition: glext.h:6031
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLfloat GLfloat p
Definition: glext.h:8902
GLenum target
Definition: glext.h:7315
tid_t
Definition: ieframe.h:311
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
static LPOLESTR
Definition: stg_prop.c:27
static refpint_t pi[]
Definition: server.c:96
static VARIANTARG static DISPID
Definition: ordinal.c:52
const char * uri
Definition: sec_mgr.c:1588
static HWND child
Definition: cursoricon.c:298
static ATOM item
Definition: dde.c:856
@ IXMLDOMNode_tid
Definition: msxml_private.h:58
@ IXMLDOMProcessingInstruction_tid
Definition: msxml_private.h:61
@ NULL_tid
Definition: msxml_private.h:45
static HRESULT return_null_bstr(BSTR *p)
static HRESULT return_null_var(VARIANT *p)
static HRESULT return_bstr(const WCHAR *value, BSTR *p)
static HRESULT return_null_node(IXMLDOMNode **p)
static const WCHAR xmlW[]
Definition: mxnamespace.c:61
unsigned int UINT
Definition: ndis.h:50
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define V_BSTR(A)
Definition: oleauto.h:226
const GUID IID_IDispatch
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define strcmpW(s1, s2)
Definition: unicode.h:44
DWORD LCID
Definition: nls.h:13
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
Definition: tree.h:489
Definition: name.c:39
Definition: send.c:48
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: dlist.c:348
Definition: pdh_main.c:94
int ret
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
enum tagDOMNodeType DOMNodeType
@ NODE_PROCESSING_INSTRUCTION
Definition: xmldom.idl:59
__wchar_t WCHAR
Definition: xmlstorage.h:180