shell32: Use S_OK as successful return code name.
[wine/multimedia.git] / dlls / msxml3 / comment.c
blobf1f94c6b283bb3cef1de2d3ddbc4aad91966c109
1 /*
2 * DOM comment node implementation
4 * Copyright 2006 Huw Davies
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.
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.
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
21 #define COBJMACROS
23 #include "config.h"
25 #include <stdarg.h>
26 #ifdef HAVE_LIBXML2
27 # include <libxml/parser.h>
28 # include <libxml/xmlerror.h>
29 #endif
31 #include "windef.h"
32 #include "winbase.h"
33 #include "winuser.h"
34 #include "ole2.h"
35 #include "msxml6.h"
37 #include "msxml_private.h"
39 #include "wine/debug.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(msxml);
43 #ifdef HAVE_LIBXML2
45 typedef struct _domcomment
47 xmlnode node;
48 IXMLDOMComment IXMLDOMComment_iface;
49 LONG ref;
50 } domcomment;
52 static const tid_t domcomment_se_tids[] = {
53 IXMLDOMNode_tid,
54 IXMLDOMComment_tid,
58 static inline domcomment *impl_from_IXMLDOMComment( IXMLDOMComment *iface )
60 return CONTAINING_RECORD(iface, domcomment, IXMLDOMComment_iface);
63 static HRESULT WINAPI domcomment_QueryInterface(
64 IXMLDOMComment *iface,
65 REFIID riid,
66 void** ppvObject )
68 domcomment *This = impl_from_IXMLDOMComment( iface );
69 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
71 if ( IsEqualGUID( riid, &IID_IXMLDOMComment ) ||
72 IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
73 IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
74 IsEqualGUID( riid, &IID_IDispatch ) ||
75 IsEqualGUID( riid, &IID_IUnknown ) )
77 *ppvObject = iface;
79 else if(node_query_interface(&This->node, riid, ppvObject))
81 return *ppvObject ? S_OK : E_NOINTERFACE;
83 else if(IsEqualGUID( riid, &IID_ISupportErrorInfo ))
85 return node_create_supporterrorinfo(domcomment_se_tids, ppvObject);
87 else
89 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
90 *ppvObject = NULL;
91 return E_NOINTERFACE;
94 IXMLDOMText_AddRef((IUnknown*)*ppvObject);
95 return S_OK;
98 static ULONG WINAPI domcomment_AddRef(
99 IXMLDOMComment *iface )
101 domcomment *This = impl_from_IXMLDOMComment( iface );
102 ULONG ref = InterlockedIncrement( &This->ref );
103 TRACE("(%p)->(%d)\n", This, ref);
104 return ref;
107 static ULONG WINAPI domcomment_Release(
108 IXMLDOMComment *iface )
110 domcomment *This = impl_from_IXMLDOMComment( iface );
111 ULONG ref = InterlockedDecrement( &This->ref );
113 TRACE("(%p)->(%d)\n", This, ref);
114 if ( ref == 0 )
116 destroy_xmlnode(&This->node);
117 heap_free( This );
120 return ref;
123 static HRESULT WINAPI domcomment_GetTypeInfoCount(
124 IXMLDOMComment *iface,
125 UINT* pctinfo )
127 domcomment *This = impl_from_IXMLDOMComment( iface );
128 return IDispatchEx_GetTypeInfoCount(&This->node.dispex.IDispatchEx_iface, pctinfo);
131 static HRESULT WINAPI domcomment_GetTypeInfo(
132 IXMLDOMComment *iface,
133 UINT iTInfo, LCID lcid,
134 ITypeInfo** ppTInfo )
136 domcomment *This = impl_from_IXMLDOMComment( iface );
137 return IDispatchEx_GetTypeInfo(&This->node.dispex.IDispatchEx_iface,
138 iTInfo, lcid, ppTInfo);
141 static HRESULT WINAPI domcomment_GetIDsOfNames(
142 IXMLDOMComment *iface,
143 REFIID riid, LPOLESTR* rgszNames,
144 UINT cNames, LCID lcid, DISPID* rgDispId )
146 domcomment *This = impl_from_IXMLDOMComment( iface );
147 return IDispatchEx_GetIDsOfNames(&This->node.dispex.IDispatchEx_iface,
148 riid, rgszNames, cNames, lcid, rgDispId);
151 static HRESULT WINAPI domcomment_Invoke(
152 IXMLDOMComment *iface,
153 DISPID dispIdMember, REFIID riid, LCID lcid,
154 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
155 EXCEPINFO* pExcepInfo, UINT* puArgErr )
157 domcomment *This = impl_from_IXMLDOMComment( iface );
158 return IDispatchEx_Invoke(&This->node.dispex.IDispatchEx_iface,
159 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
162 static HRESULT WINAPI domcomment_get_nodeName(
163 IXMLDOMComment *iface,
164 BSTR* p )
166 domcomment *This = impl_from_IXMLDOMComment( iface );
168 static const WCHAR commentW[] = {'#','c','o','m','m','e','n','t',0};
170 TRACE("(%p)->(%p)\n", This, p);
172 return return_bstr(commentW, p);
175 static HRESULT WINAPI domcomment_get_nodeValue(
176 IXMLDOMComment *iface,
177 VARIANT* value)
179 domcomment *This = impl_from_IXMLDOMComment( iface );
181 TRACE("(%p)->(%p)\n", This, value);
183 return node_get_content(&This->node, value);
186 static HRESULT WINAPI domcomment_put_nodeValue(
187 IXMLDOMComment *iface,
188 VARIANT value)
190 domcomment *This = impl_from_IXMLDOMComment( iface );
192 TRACE("(%p)->(%s)\n", This, debugstr_variant(&value));
194 return node_put_value(&This->node, &value);
197 static HRESULT WINAPI domcomment_get_nodeType(
198 IXMLDOMComment *iface,
199 DOMNodeType* domNodeType )
201 domcomment *This = impl_from_IXMLDOMComment( iface );
203 TRACE("(%p)->(%p)\n", This, domNodeType);
205 *domNodeType = NODE_COMMENT;
206 return S_OK;
209 static HRESULT WINAPI domcomment_get_parentNode(
210 IXMLDOMComment *iface,
211 IXMLDOMNode** parent )
213 domcomment *This = impl_from_IXMLDOMComment( iface );
215 TRACE("(%p)->(%p)\n", This, parent);
217 return node_get_parent(&This->node, parent);
220 static HRESULT WINAPI domcomment_get_childNodes(
221 IXMLDOMComment *iface,
222 IXMLDOMNodeList** outList)
224 domcomment *This = impl_from_IXMLDOMComment( iface );
226 TRACE("(%p)->(%p)\n", This, outList);
228 return node_get_child_nodes(&This->node, outList);
231 static HRESULT WINAPI domcomment_get_firstChild(
232 IXMLDOMComment *iface,
233 IXMLDOMNode** domNode)
235 domcomment *This = impl_from_IXMLDOMComment( iface );
237 TRACE("(%p)->(%p)\n", This, domNode);
239 return return_null_node(domNode);
242 static HRESULT WINAPI domcomment_get_lastChild(
243 IXMLDOMComment *iface,
244 IXMLDOMNode** domNode)
246 domcomment *This = impl_from_IXMLDOMComment( iface );
248 TRACE("(%p)->(%p)\n", This, domNode);
250 return return_null_node(domNode);
253 static HRESULT WINAPI domcomment_get_previousSibling(
254 IXMLDOMComment *iface,
255 IXMLDOMNode** domNode)
257 domcomment *This = impl_from_IXMLDOMComment( iface );
259 TRACE("(%p)->(%p)\n", This, domNode);
261 return node_get_previous_sibling(&This->node, domNode);
264 static HRESULT WINAPI domcomment_get_nextSibling(
265 IXMLDOMComment *iface,
266 IXMLDOMNode** domNode)
268 domcomment *This = impl_from_IXMLDOMComment( iface );
270 TRACE("(%p)->(%p)\n", This, domNode);
272 return node_get_next_sibling(&This->node, domNode);
275 static HRESULT WINAPI domcomment_get_attributes(
276 IXMLDOMComment *iface,
277 IXMLDOMNamedNodeMap** attributeMap)
279 domcomment *This = impl_from_IXMLDOMComment( iface );
281 TRACE("(%p)->(%p)\n", This, attributeMap);
283 return return_null_ptr((void**)attributeMap);
286 static HRESULT WINAPI domcomment_insertBefore(
287 IXMLDOMComment *iface,
288 IXMLDOMNode* newNode, VARIANT refChild,
289 IXMLDOMNode** outOldNode)
291 domcomment *This = impl_from_IXMLDOMComment( iface );
293 FIXME("(%p)->(%p %s %p) needs test\n", This, newNode, debugstr_variant(&refChild), outOldNode);
295 return node_insert_before(&This->node, newNode, &refChild, outOldNode);
298 static HRESULT WINAPI domcomment_replaceChild(
299 IXMLDOMComment *iface,
300 IXMLDOMNode* newNode,
301 IXMLDOMNode* oldNode,
302 IXMLDOMNode** outOldNode)
304 domcomment *This = impl_from_IXMLDOMComment( iface );
306 FIXME("(%p)->(%p %p %p) needs tests\n", This, newNode, oldNode, outOldNode);
308 return node_replace_child(&This->node, newNode, oldNode, outOldNode);
311 static HRESULT WINAPI domcomment_removeChild(
312 IXMLDOMComment *iface,
313 IXMLDOMNode *child, IXMLDOMNode **oldChild)
315 domcomment *This = impl_from_IXMLDOMComment( iface );
316 TRACE("(%p)->(%p %p)\n", This, child, oldChild);
317 return node_remove_child(&This->node, child, oldChild);
320 static HRESULT WINAPI domcomment_appendChild(
321 IXMLDOMComment *iface,
322 IXMLDOMNode *child, IXMLDOMNode **outChild)
324 domcomment *This = impl_from_IXMLDOMComment( iface );
325 TRACE("(%p)->(%p %p)\n", This, child, outChild);
326 return node_append_child(&This->node, child, outChild);
329 static HRESULT WINAPI domcomment_hasChildNodes(
330 IXMLDOMComment *iface,
331 VARIANT_BOOL *ret)
333 domcomment *This = impl_from_IXMLDOMComment( iface );
334 TRACE("(%p)->(%p)\n", This, ret);
335 return node_has_childnodes(&This->node, ret);
338 static HRESULT WINAPI domcomment_get_ownerDocument(
339 IXMLDOMComment *iface,
340 IXMLDOMDocument **doc)
342 domcomment *This = impl_from_IXMLDOMComment( iface );
343 TRACE("(%p)->(%p)\n", This, doc);
344 return node_get_owner_doc(&This->node, doc);
347 static HRESULT WINAPI domcomment_cloneNode(
348 IXMLDOMComment *iface,
349 VARIANT_BOOL deep, IXMLDOMNode** outNode)
351 domcomment *This = impl_from_IXMLDOMComment( iface );
352 TRACE("(%p)->(%d %p)\n", This, deep, outNode);
353 return node_clone( &This->node, deep, outNode );
356 static HRESULT WINAPI domcomment_get_nodeTypeString(
357 IXMLDOMComment *iface,
358 BSTR* p)
360 domcomment *This = impl_from_IXMLDOMComment( iface );
361 static const WCHAR commentW[] = {'c','o','m','m','e','n','t',0};
363 TRACE("(%p)->(%p)\n", This, p);
365 return return_bstr(commentW, p);
368 static HRESULT WINAPI domcomment_get_text(
369 IXMLDOMComment *iface,
370 BSTR* p)
372 domcomment *This = impl_from_IXMLDOMComment( iface );
373 TRACE("(%p)->(%p)\n", This, p);
374 return node_get_text(&This->node, p);
377 static HRESULT WINAPI domcomment_put_text(
378 IXMLDOMComment *iface,
379 BSTR p)
381 domcomment *This = impl_from_IXMLDOMComment( iface );
382 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
383 return node_put_text( &This->node, p );
386 static HRESULT WINAPI domcomment_get_specified(
387 IXMLDOMComment *iface,
388 VARIANT_BOOL* isSpecified)
390 domcomment *This = impl_from_IXMLDOMComment( iface );
391 FIXME("(%p)->(%p) stub!\n", This, isSpecified);
392 *isSpecified = VARIANT_TRUE;
393 return S_OK;
396 static HRESULT WINAPI domcomment_get_definition(
397 IXMLDOMComment *iface,
398 IXMLDOMNode** definitionNode)
400 domcomment *This = impl_from_IXMLDOMComment( iface );
401 FIXME("(%p)->(%p)\n", This, definitionNode);
402 return E_NOTIMPL;
405 static HRESULT WINAPI domcomment_get_nodeTypedValue(
406 IXMLDOMComment *iface,
407 VARIANT* v)
409 domcomment *This = impl_from_IXMLDOMComment( iface );
410 TRACE("(%p)->(%p)\n", This, v);
411 return node_get_content(&This->node, v);
414 static HRESULT WINAPI domcomment_put_nodeTypedValue(
415 IXMLDOMComment *iface,
416 VARIANT typedValue)
418 domcomment *This = impl_from_IXMLDOMComment( iface );
419 FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue));
420 return E_NOTIMPL;
423 static HRESULT WINAPI domcomment_get_dataType(
424 IXMLDOMComment *iface,
425 VARIANT* typename)
427 domcomment *This = impl_from_IXMLDOMComment( iface );
428 TRACE("(%p)->(%p)\n", This, typename);
429 return return_null_var( typename );
432 static HRESULT WINAPI domcomment_put_dataType(
433 IXMLDOMComment *iface,
434 BSTR p)
436 domcomment *This = impl_from_IXMLDOMComment( iface );
438 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
440 if(!p)
441 return E_INVALIDARG;
443 return E_FAIL;
446 static HRESULT WINAPI domcomment_get_xml(
447 IXMLDOMComment *iface,
448 BSTR* p)
450 domcomment *This = impl_from_IXMLDOMComment( iface );
452 TRACE("(%p)->(%p)\n", This, p);
454 return node_get_xml(&This->node, FALSE, FALSE, p);
457 static HRESULT WINAPI domcomment_transformNode(
458 IXMLDOMComment *iface,
459 IXMLDOMNode *node, BSTR *p)
461 domcomment *This = impl_from_IXMLDOMComment( iface );
462 TRACE("(%p)->(%p %p)\n", This, node, p);
463 return node_transform_node(&This->node, node, p);
466 static HRESULT WINAPI domcomment_selectNodes(
467 IXMLDOMComment *iface,
468 BSTR p, IXMLDOMNodeList** outList)
470 domcomment *This = impl_from_IXMLDOMComment( iface );
471 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
472 return node_select_nodes(&This->node, p, outList);
475 static HRESULT WINAPI domcomment_selectSingleNode(
476 IXMLDOMComment *iface,
477 BSTR p, IXMLDOMNode** outNode)
479 domcomment *This = impl_from_IXMLDOMComment( iface );
480 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode);
481 return node_select_singlenode(&This->node, p, outNode);
484 static HRESULT WINAPI domcomment_get_parsed(
485 IXMLDOMComment *iface,
486 VARIANT_BOOL* isParsed)
488 domcomment *This = impl_from_IXMLDOMComment( iface );
489 FIXME("(%p)->(%p) stub!\n", This, isParsed);
490 *isParsed = VARIANT_TRUE;
491 return S_OK;
494 static HRESULT WINAPI domcomment_get_namespaceURI(
495 IXMLDOMComment *iface,
496 BSTR* p)
498 domcomment *This = impl_from_IXMLDOMComment( iface );
499 TRACE("(%p)->(%p)\n", This, p);
500 return node_get_namespaceURI(&This->node, p);
503 static HRESULT WINAPI domcomment_get_prefix(
504 IXMLDOMComment *iface,
505 BSTR* prefix)
507 domcomment *This = impl_from_IXMLDOMComment( iface );
508 TRACE("(%p)->(%p)\n", This, prefix);
509 return return_null_bstr( prefix );
512 static HRESULT WINAPI domcomment_get_baseName(
513 IXMLDOMComment *iface,
514 BSTR* name)
516 domcomment *This = impl_from_IXMLDOMComment( iface );
517 TRACE("(%p)->(%p)\n", This, name);
518 return return_null_bstr( name );
521 static HRESULT WINAPI domcomment_transformNodeToObject(
522 IXMLDOMComment *iface,
523 IXMLDOMNode* domNode, VARIANT var1)
525 domcomment *This = impl_from_IXMLDOMComment( iface );
526 FIXME("(%p)->(%p %s)\n", This, domNode, debugstr_variant(&var1));
527 return E_NOTIMPL;
530 static HRESULT WINAPI domcomment_get_data(
531 IXMLDOMComment *iface,
532 BSTR *p)
534 domcomment *This = impl_from_IXMLDOMComment( iface );
535 HRESULT hr;
536 VARIANT vRet;
538 TRACE("(%p)->(%p)\n", This, p);
540 if(!p)
541 return E_INVALIDARG;
543 hr = IXMLDOMComment_get_nodeValue( iface, &vRet );
544 if(hr == S_OK)
546 *p = V_BSTR(&vRet);
549 return hr;
552 static HRESULT WINAPI domcomment_put_data(
553 IXMLDOMComment *iface,
554 BSTR data)
556 domcomment *This = impl_from_IXMLDOMComment( iface );
557 VARIANT val;
559 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
561 V_VT(&val) = VT_BSTR;
562 V_BSTR(&val) = data;
563 return node_put_value(&This->node, &val);
566 static HRESULT WINAPI domcomment_get_length(
567 IXMLDOMComment *iface,
568 LONG *len)
570 domcomment *This = impl_from_IXMLDOMComment( iface );
571 HRESULT hr;
572 BSTR data;
574 TRACE("(%p)->(%p)\n", This, len);
576 if(!len)
577 return E_INVALIDARG;
579 hr = IXMLDOMComment_get_data(iface, &data);
580 if(hr == S_OK)
582 *len = SysStringLen(data);
583 SysFreeString(data);
586 return hr;
589 static HRESULT WINAPI domcomment_substringData(
590 IXMLDOMComment *iface,
591 LONG offset, LONG count, BSTR *p)
593 domcomment *This = impl_from_IXMLDOMComment( iface );
594 HRESULT hr;
595 BSTR data;
597 TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
599 if(!p)
600 return E_INVALIDARG;
602 *p = NULL;
603 if(offset < 0 || count < 0)
604 return E_INVALIDARG;
606 if(count == 0)
607 return S_FALSE;
609 hr = IXMLDOMComment_get_data(iface, &data);
610 if(hr == S_OK)
612 LONG len = SysStringLen(data);
614 if(offset < len)
616 if(offset + count > len)
617 *p = SysAllocString(&data[offset]);
618 else
619 *p = SysAllocStringLen(&data[offset], count);
621 else
622 hr = S_FALSE;
624 SysFreeString(data);
627 return hr;
630 static HRESULT WINAPI domcomment_appendData(
631 IXMLDOMComment *iface,
632 BSTR p)
634 domcomment *This = impl_from_IXMLDOMComment( iface );
635 HRESULT hr;
636 BSTR data;
637 LONG p_len;
639 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
641 /* Nothing to do if NULL or an Empty string passed in. */
642 if((p_len = SysStringLen(p)) == 0) return S_OK;
644 hr = IXMLDOMComment_get_data(iface, &data);
645 if(hr == S_OK)
647 LONG len = SysStringLen(data);
648 BSTR str = SysAllocStringLen(NULL, p_len + len);
650 memcpy(str, data, len*sizeof(WCHAR));
651 memcpy(&str[len], p, p_len*sizeof(WCHAR));
652 str[len+p_len] = 0;
654 hr = IXMLDOMComment_put_data(iface, str);
656 SysFreeString(str);
657 SysFreeString(data);
660 return hr;
663 static HRESULT WINAPI domcomment_insertData(
664 IXMLDOMComment *iface,
665 LONG offset, BSTR p)
667 domcomment *This = impl_from_IXMLDOMComment( iface );
668 HRESULT hr;
669 BSTR data;
670 LONG p_len;
672 TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
674 /* If have a NULL or empty string, don't do anything. */
675 if((p_len = SysStringLen(p)) == 0)
676 return S_OK;
678 if(offset < 0)
680 return E_INVALIDARG;
683 hr = IXMLDOMComment_get_data(iface, &data);
684 if(hr == S_OK)
686 LONG len = SysStringLen(data);
687 BSTR str;
689 if(len < offset)
691 SysFreeString(data);
692 return E_INVALIDARG;
695 str = SysAllocStringLen(NULL, len + p_len);
696 /* start part, supplied string and end part */
697 memcpy(str, data, offset*sizeof(WCHAR));
698 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
699 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
700 str[len+p_len] = 0;
702 hr = IXMLDOMComment_put_data(iface, str);
704 SysFreeString(str);
705 SysFreeString(data);
708 return hr;
711 static HRESULT WINAPI domcomment_deleteData(
712 IXMLDOMComment *iface,
713 LONG offset, LONG count)
715 HRESULT hr;
716 LONG len = -1;
717 BSTR str;
719 TRACE("(%p)->(%d %d)\n", iface, offset, count);
721 hr = IXMLDOMComment_get_length(iface, &len);
722 if(hr != S_OK) return hr;
724 if((offset < 0) || (offset > len) || (count < 0))
725 return E_INVALIDARG;
727 if(len == 0) return S_OK;
729 /* cutting start or end */
730 if((offset == 0) || ((count + offset) >= len))
732 if(offset == 0)
733 IXMLDOMComment_substringData(iface, count, len - count, &str);
734 else
735 IXMLDOMComment_substringData(iface, 0, offset, &str);
736 hr = IXMLDOMComment_put_data(iface, str);
738 else
739 /* cutting from the inside */
741 BSTR str_end;
743 IXMLDOMComment_substringData(iface, 0, offset, &str);
744 IXMLDOMComment_substringData(iface, offset + count, len - count, &str_end);
746 hr = IXMLDOMComment_put_data(iface, str);
747 if(hr == S_OK)
748 hr = IXMLDOMComment_appendData(iface, str_end);
750 SysFreeString(str_end);
753 SysFreeString(str);
755 return hr;
758 static HRESULT WINAPI domcomment_replaceData(
759 IXMLDOMComment *iface,
760 LONG offset, LONG count, BSTR p)
762 domcomment *This = impl_from_IXMLDOMComment( iface );
763 HRESULT hr;
765 TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
767 hr = IXMLDOMComment_deleteData(iface, offset, count);
769 if (hr == S_OK)
770 hr = IXMLDOMComment_insertData(iface, offset, p);
772 return hr;
775 static const struct IXMLDOMCommentVtbl domcomment_vtbl =
777 domcomment_QueryInterface,
778 domcomment_AddRef,
779 domcomment_Release,
780 domcomment_GetTypeInfoCount,
781 domcomment_GetTypeInfo,
782 domcomment_GetIDsOfNames,
783 domcomment_Invoke,
784 domcomment_get_nodeName,
785 domcomment_get_nodeValue,
786 domcomment_put_nodeValue,
787 domcomment_get_nodeType,
788 domcomment_get_parentNode,
789 domcomment_get_childNodes,
790 domcomment_get_firstChild,
791 domcomment_get_lastChild,
792 domcomment_get_previousSibling,
793 domcomment_get_nextSibling,
794 domcomment_get_attributes,
795 domcomment_insertBefore,
796 domcomment_replaceChild,
797 domcomment_removeChild,
798 domcomment_appendChild,
799 domcomment_hasChildNodes,
800 domcomment_get_ownerDocument,
801 domcomment_cloneNode,
802 domcomment_get_nodeTypeString,
803 domcomment_get_text,
804 domcomment_put_text,
805 domcomment_get_specified,
806 domcomment_get_definition,
807 domcomment_get_nodeTypedValue,
808 domcomment_put_nodeTypedValue,
809 domcomment_get_dataType,
810 domcomment_put_dataType,
811 domcomment_get_xml,
812 domcomment_transformNode,
813 domcomment_selectNodes,
814 domcomment_selectSingleNode,
815 domcomment_get_parsed,
816 domcomment_get_namespaceURI,
817 domcomment_get_prefix,
818 domcomment_get_baseName,
819 domcomment_transformNodeToObject,
820 domcomment_get_data,
821 domcomment_put_data,
822 domcomment_get_length,
823 domcomment_substringData,
824 domcomment_appendData,
825 domcomment_insertData,
826 domcomment_deleteData,
827 domcomment_replaceData
830 static const tid_t domcomment_iface_tids[] = {
831 IXMLDOMComment_tid,
835 static dispex_static_data_t domcomment_dispex = {
836 NULL,
837 IXMLDOMComment_tid,
838 NULL,
839 domcomment_iface_tids
842 IUnknown* create_comment( xmlNodePtr comment )
844 domcomment *This;
846 This = heap_alloc( sizeof *This );
847 if ( !This )
848 return NULL;
850 This->IXMLDOMComment_iface.lpVtbl = &domcomment_vtbl;
851 This->ref = 1;
853 init_xmlnode(&This->node, comment, (IXMLDOMNode*)&This->IXMLDOMComment_iface, &domcomment_dispex);
855 return (IUnknown*)&This->IXMLDOMComment_iface;
858 #endif