msxml3: Don't use xmlnode's IXMLDOMNode iface in get_attributes implementations.
[wine/multimedia.git] / dlls / msxml3 / comment.c
blobdee94b2b059acf8c1efff29c280f7a95b1d14c95
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 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
30 #include "msxml6.h"
32 #include "msxml_private.h"
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(msxml);
38 #ifdef HAVE_LIBXML2
40 typedef struct _domcomment
42 xmlnode node;
43 const struct IXMLDOMCommentVtbl *lpVtbl;
44 LONG ref;
45 } domcomment;
47 static inline domcomment *impl_from_IXMLDOMComment( IXMLDOMComment *iface )
49 return (domcomment *)((char*)iface - FIELD_OFFSET(domcomment, lpVtbl));
52 static HRESULT WINAPI domcomment_QueryInterface(
53 IXMLDOMComment *iface,
54 REFIID riid,
55 void** ppvObject )
57 domcomment *This = impl_from_IXMLDOMComment( iface );
58 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
60 if ( IsEqualGUID( riid, &IID_IXMLDOMComment ) ||
61 IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
62 IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
63 IsEqualGUID( riid, &IID_IDispatch ) ||
64 IsEqualGUID( riid, &IID_IUnknown ) )
66 *ppvObject = iface;
68 else if(node_query_interface(&This->node, riid, ppvObject))
70 return *ppvObject ? S_OK : E_NOINTERFACE;
72 else
74 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
75 return E_NOINTERFACE;
78 IXMLDOMText_AddRef((IUnknown*)*ppvObject);
79 return S_OK;
82 static ULONG WINAPI domcomment_AddRef(
83 IXMLDOMComment *iface )
85 domcomment *This = impl_from_IXMLDOMComment( iface );
86 return InterlockedIncrement( &This->ref );
89 static ULONG WINAPI domcomment_Release(
90 IXMLDOMComment *iface )
92 domcomment *This = impl_from_IXMLDOMComment( iface );
93 ULONG ref;
95 ref = InterlockedDecrement( &This->ref );
96 if ( ref == 0 )
98 destroy_xmlnode(&This->node);
99 heap_free( This );
102 return ref;
105 static HRESULT WINAPI domcomment_GetTypeInfoCount(
106 IXMLDOMComment *iface,
107 UINT* pctinfo )
109 domcomment *This = impl_from_IXMLDOMComment( iface );
111 TRACE("(%p)->(%p)\n", This, pctinfo);
113 *pctinfo = 1;
115 return S_OK;
118 static HRESULT WINAPI domcomment_GetTypeInfo(
119 IXMLDOMComment *iface,
120 UINT iTInfo, LCID lcid,
121 ITypeInfo** ppTInfo )
123 domcomment *This = impl_from_IXMLDOMComment( iface );
124 HRESULT hr;
126 TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
128 hr = get_typeinfo(IXMLDOMComment_tid, ppTInfo);
130 return hr;
133 static HRESULT WINAPI domcomment_GetIDsOfNames(
134 IXMLDOMComment *iface,
135 REFIID riid, LPOLESTR* rgszNames,
136 UINT cNames, LCID lcid, DISPID* rgDispId )
138 domcomment *This = impl_from_IXMLDOMComment( iface );
139 ITypeInfo *typeinfo;
140 HRESULT hr;
142 TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
143 lcid, rgDispId);
145 if(!rgszNames || cNames == 0 || !rgDispId)
146 return E_INVALIDARG;
148 hr = get_typeinfo(IXMLDOMComment_tid, &typeinfo);
149 if(SUCCEEDED(hr))
151 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
152 ITypeInfo_Release(typeinfo);
155 return hr;
158 static HRESULT WINAPI domcomment_Invoke(
159 IXMLDOMComment *iface,
160 DISPID dispIdMember, REFIID riid, LCID lcid,
161 WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult,
162 EXCEPINFO* pExcepInfo, UINT* puArgErr )
164 domcomment *This = impl_from_IXMLDOMComment( iface );
165 ITypeInfo *typeinfo;
166 HRESULT hr;
168 TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
169 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
171 hr = get_typeinfo(IXMLDOMComment_tid, &typeinfo);
172 if(SUCCEEDED(hr))
174 hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams,
175 pVarResult, pExcepInfo, puArgErr);
176 ITypeInfo_Release(typeinfo);
179 return hr;
182 static HRESULT WINAPI domcomment_get_nodeName(
183 IXMLDOMComment *iface,
184 BSTR* p )
186 domcomment *This = impl_from_IXMLDOMComment( iface );
188 static const WCHAR commentW[] = {'#','c','o','m','m','e','n','t',0};
190 TRACE("(%p)->(%p)\n", This, p);
192 return return_bstr(commentW, p);
195 static HRESULT WINAPI domcomment_get_nodeValue(
196 IXMLDOMComment *iface,
197 VARIANT* value)
199 domcomment *This = impl_from_IXMLDOMComment( iface );
201 TRACE("(%p)->(%p)\n", This, value);
203 return node_get_content(&This->node, value);
206 static HRESULT WINAPI domcomment_put_nodeValue(
207 IXMLDOMComment *iface,
208 VARIANT value)
210 domcomment *This = impl_from_IXMLDOMComment( iface );
212 TRACE("(%p)->(v%d)\n", This, V_VT(&value));
214 return node_put_value(&This->node, &value);
217 static HRESULT WINAPI domcomment_get_nodeType(
218 IXMLDOMComment *iface,
219 DOMNodeType* domNodeType )
221 domcomment *This = impl_from_IXMLDOMComment( iface );
223 TRACE("(%p)->(%p)\n", This, domNodeType);
225 *domNodeType = NODE_COMMENT;
226 return S_OK;
229 static HRESULT WINAPI domcomment_get_parentNode(
230 IXMLDOMComment *iface,
231 IXMLDOMNode** parent )
233 domcomment *This = impl_from_IXMLDOMComment( iface );
235 TRACE("(%p)->(%p)\n", This, parent);
237 return node_get_parent(&This->node, parent);
240 static HRESULT WINAPI domcomment_get_childNodes(
241 IXMLDOMComment *iface,
242 IXMLDOMNodeList** outList)
244 domcomment *This = impl_from_IXMLDOMComment( iface );
246 TRACE("(%p)->(%p)\n", This, outList);
248 return node_get_child_nodes(&This->node, outList);
251 static HRESULT WINAPI domcomment_get_firstChild(
252 IXMLDOMComment *iface,
253 IXMLDOMNode** domNode)
255 domcomment *This = impl_from_IXMLDOMComment( iface );
257 TRACE("(%p)->(%p)\n", This, domNode);
259 return return_null_node(domNode);
262 static HRESULT WINAPI domcomment_get_lastChild(
263 IXMLDOMComment *iface,
264 IXMLDOMNode** domNode)
266 domcomment *This = impl_from_IXMLDOMComment( iface );
268 TRACE("(%p)->(%p)\n", This, domNode);
270 return return_null_node(domNode);
273 static HRESULT WINAPI domcomment_get_previousSibling(
274 IXMLDOMComment *iface,
275 IXMLDOMNode** domNode)
277 domcomment *This = impl_from_IXMLDOMComment( iface );
279 TRACE("(%p)->(%p)\n", This, domNode);
281 return node_get_previous_sibling(&This->node, domNode);
284 static HRESULT WINAPI domcomment_get_nextSibling(
285 IXMLDOMComment *iface,
286 IXMLDOMNode** domNode)
288 domcomment *This = impl_from_IXMLDOMComment( iface );
290 TRACE("(%p)->(%p)\n", This, domNode);
292 return node_get_next_sibling(&This->node, domNode);
295 static HRESULT WINAPI domcomment_get_attributes(
296 IXMLDOMComment *iface,
297 IXMLDOMNamedNodeMap** attributeMap)
299 domcomment *This = impl_from_IXMLDOMComment( iface );
301 TRACE("(%p)->(%p)\n", This, attributeMap);
303 return return_null_ptr((void**)attributeMap);
306 static HRESULT WINAPI domcomment_insertBefore(
307 IXMLDOMComment *iface,
308 IXMLDOMNode* newNode, VARIANT var1,
309 IXMLDOMNode** outOldNode)
311 domcomment *This = impl_from_IXMLDOMComment( iface );
312 return IXMLDOMNode_insertBefore( IXMLDOMNode_from_impl(&This->node), newNode, var1, outOldNode );
315 static HRESULT WINAPI domcomment_replaceChild(
316 IXMLDOMComment *iface,
317 IXMLDOMNode* newNode,
318 IXMLDOMNode* oldNode,
319 IXMLDOMNode** outOldNode)
321 domcomment *This = impl_from_IXMLDOMComment( iface );
322 return IXMLDOMNode_replaceChild( IXMLDOMNode_from_impl(&This->node), newNode, oldNode, outOldNode );
325 static HRESULT WINAPI domcomment_removeChild(
326 IXMLDOMComment *iface,
327 IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
329 domcomment *This = impl_from_IXMLDOMComment( iface );
330 return IXMLDOMNode_removeChild( IXMLDOMNode_from_impl(&This->node), domNode, oldNode );
333 static HRESULT WINAPI domcomment_appendChild(
334 IXMLDOMComment *iface,
335 IXMLDOMNode* newNode, IXMLDOMNode** outNewNode)
337 domcomment *This = impl_from_IXMLDOMComment( iface );
338 return IXMLDOMNode_appendChild( IXMLDOMNode_from_impl(&This->node), newNode, outNewNode );
341 static HRESULT WINAPI domcomment_hasChildNodes(
342 IXMLDOMComment *iface,
343 VARIANT_BOOL* pbool)
345 domcomment *This = impl_from_IXMLDOMComment( iface );
346 return IXMLDOMNode_hasChildNodes( IXMLDOMNode_from_impl(&This->node), pbool );
349 static HRESULT WINAPI domcomment_get_ownerDocument(
350 IXMLDOMComment *iface,
351 IXMLDOMDocument** domDocument)
353 domcomment *This = impl_from_IXMLDOMComment( iface );
354 return IXMLDOMNode_get_ownerDocument( IXMLDOMNode_from_impl(&This->node), domDocument );
357 static HRESULT WINAPI domcomment_cloneNode(
358 IXMLDOMComment *iface,
359 VARIANT_BOOL pbool, IXMLDOMNode** outNode)
361 domcomment *This = impl_from_IXMLDOMComment( iface );
362 return IXMLDOMNode_cloneNode( IXMLDOMNode_from_impl(&This->node), pbool, outNode );
365 static HRESULT WINAPI domcomment_get_nodeTypeString(
366 IXMLDOMComment *iface,
367 BSTR* p)
369 domcomment *This = impl_from_IXMLDOMComment( iface );
370 return IXMLDOMNode_get_nodeTypeString( IXMLDOMNode_from_impl(&This->node), p );
373 static HRESULT WINAPI domcomment_get_text(
374 IXMLDOMComment *iface,
375 BSTR* p)
377 domcomment *This = impl_from_IXMLDOMComment( iface );
378 return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
381 static HRESULT WINAPI domcomment_put_text(
382 IXMLDOMComment *iface,
383 BSTR p)
385 domcomment *This = impl_from_IXMLDOMComment( iface );
386 return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p );
389 static HRESULT WINAPI domcomment_get_specified(
390 IXMLDOMComment *iface,
391 VARIANT_BOOL* pbool)
393 domcomment *This = impl_from_IXMLDOMComment( iface );
394 return IXMLDOMNode_get_specified( IXMLDOMNode_from_impl(&This->node), pbool );
397 static HRESULT WINAPI domcomment_get_definition(
398 IXMLDOMComment *iface,
399 IXMLDOMNode** domNode)
401 domcomment *This = impl_from_IXMLDOMComment( iface );
402 return IXMLDOMNode_get_definition( IXMLDOMNode_from_impl(&This->node), domNode );
405 static HRESULT WINAPI domcomment_get_nodeTypedValue(
406 IXMLDOMComment *iface,
407 VARIANT* var1)
409 domcomment *This = impl_from_IXMLDOMComment( iface );
410 return IXMLDOMNode_get_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
413 static HRESULT WINAPI domcomment_put_nodeTypedValue(
414 IXMLDOMComment *iface,
415 VARIANT var1)
417 domcomment *This = impl_from_IXMLDOMComment( iface );
418 return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
421 static HRESULT WINAPI domcomment_get_dataType(
422 IXMLDOMComment *iface,
423 VARIANT* var1)
425 domcomment *This = impl_from_IXMLDOMComment( iface );
426 return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
429 static HRESULT WINAPI domcomment_put_dataType(
430 IXMLDOMComment *iface,
431 BSTR p)
433 domcomment *This = impl_from_IXMLDOMComment( iface );
434 return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p );
437 static HRESULT WINAPI domcomment_get_xml(
438 IXMLDOMComment *iface,
439 BSTR* p)
441 domcomment *This = impl_from_IXMLDOMComment( iface );
442 return IXMLDOMNode_get_xml( IXMLDOMNode_from_impl(&This->node), p );
445 static HRESULT WINAPI domcomment_transformNode(
446 IXMLDOMComment *iface,
447 IXMLDOMNode* domNode, BSTR* p)
449 domcomment *This = impl_from_IXMLDOMComment( iface );
450 return IXMLDOMNode_transformNode( IXMLDOMNode_from_impl(&This->node), domNode, p );
453 static HRESULT WINAPI domcomment_selectNodes(
454 IXMLDOMComment *iface,
455 BSTR p, IXMLDOMNodeList** outList)
457 domcomment *This = impl_from_IXMLDOMComment( iface );
458 return IXMLDOMNode_selectNodes( IXMLDOMNode_from_impl(&This->node), p, outList );
461 static HRESULT WINAPI domcomment_selectSingleNode(
462 IXMLDOMComment *iface,
463 BSTR p, IXMLDOMNode** outNode)
465 domcomment *This = impl_from_IXMLDOMComment( iface );
466 return IXMLDOMNode_selectSingleNode( IXMLDOMNode_from_impl(&This->node), p, outNode );
469 static HRESULT WINAPI domcomment_get_parsed(
470 IXMLDOMComment *iface,
471 VARIANT_BOOL* pbool)
473 domcomment *This = impl_from_IXMLDOMComment( iface );
474 return IXMLDOMNode_get_parsed( IXMLDOMNode_from_impl(&This->node), pbool );
477 static HRESULT WINAPI domcomment_get_namespaceURI(
478 IXMLDOMComment *iface,
479 BSTR* p)
481 domcomment *This = impl_from_IXMLDOMComment( iface );
482 return IXMLDOMNode_get_namespaceURI( IXMLDOMNode_from_impl(&This->node), p );
485 static HRESULT WINAPI domcomment_get_prefix(
486 IXMLDOMComment *iface,
487 BSTR* p)
489 domcomment *This = impl_from_IXMLDOMComment( iface );
490 return IXMLDOMNode_get_prefix( IXMLDOMNode_from_impl(&This->node), p );
493 static HRESULT WINAPI domcomment_get_baseName(
494 IXMLDOMComment *iface,
495 BSTR* p)
497 domcomment *This = impl_from_IXMLDOMComment( iface );
498 return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
501 static HRESULT WINAPI domcomment_transformNodeToObject(
502 IXMLDOMComment *iface,
503 IXMLDOMNode* domNode, VARIANT var1)
505 domcomment *This = impl_from_IXMLDOMComment( iface );
506 return IXMLDOMNode_transformNodeToObject( IXMLDOMNode_from_impl(&This->node), domNode, var1 );
509 static HRESULT WINAPI domcomment_get_data(
510 IXMLDOMComment *iface,
511 BSTR *p)
513 domcomment *This = impl_from_IXMLDOMComment( iface );
514 HRESULT hr;
515 VARIANT vRet;
517 TRACE("(%p)->(%p)\n", This, p);
519 if(!p)
520 return E_INVALIDARG;
522 hr = IXMLDOMComment_get_nodeValue( iface, &vRet );
523 if(hr == S_OK)
525 *p = V_BSTR(&vRet);
528 return hr;
531 static HRESULT WINAPI domcomment_put_data(
532 IXMLDOMComment *iface,
533 BSTR data)
535 domcomment *This = impl_from_IXMLDOMComment( iface );
536 VARIANT val;
538 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
540 V_VT(&val) = VT_BSTR;
541 V_BSTR(&val) = data;
542 return node_put_value(&This->node, &val);
545 static HRESULT WINAPI domcomment_get_length(
546 IXMLDOMComment *iface,
547 LONG *len)
549 domcomment *This = impl_from_IXMLDOMComment( iface );
550 HRESULT hr;
551 BSTR data;
553 TRACE("(%p)->(%p)\n", This, len);
555 if(!len)
556 return E_INVALIDARG;
558 hr = IXMLDOMComment_get_data(iface, &data);
559 if(hr == S_OK)
561 *len = SysStringLen(data);
562 SysFreeString(data);
565 return hr;
568 static HRESULT WINAPI domcomment_substringData(
569 IXMLDOMComment *iface,
570 LONG offset, LONG count, BSTR *p)
572 domcomment *This = impl_from_IXMLDOMComment( iface );
573 HRESULT hr;
574 BSTR data;
576 TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
578 if(!p)
579 return E_INVALIDARG;
581 *p = NULL;
582 if(offset < 0 || count < 0)
583 return E_INVALIDARG;
585 if(count == 0)
586 return S_FALSE;
588 hr = IXMLDOMComment_get_data(iface, &data);
589 if(hr == S_OK)
591 LONG len = SysStringLen(data);
593 if(offset < len)
595 if(offset + count > len)
596 *p = SysAllocString(&data[offset]);
597 else
598 *p = SysAllocStringLen(&data[offset], count);
600 else
601 hr = S_FALSE;
603 SysFreeString(data);
606 return hr;
609 static HRESULT WINAPI domcomment_appendData(
610 IXMLDOMComment *iface,
611 BSTR p)
613 domcomment *This = impl_from_IXMLDOMComment( iface );
614 HRESULT hr;
615 BSTR data;
616 LONG p_len;
618 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
620 /* Nothing to do if NULL or an Empty string passed in. */
621 if((p_len = SysStringLen(p)) == 0) return S_OK;
623 hr = IXMLDOMComment_get_data(iface, &data);
624 if(hr == S_OK)
626 LONG len = SysStringLen(data);
627 BSTR str = SysAllocStringLen(NULL, p_len + len);
629 memcpy(str, data, len*sizeof(WCHAR));
630 memcpy(&str[len], p, p_len*sizeof(WCHAR));
631 str[len+p_len] = 0;
633 hr = IXMLDOMComment_put_data(iface, str);
635 SysFreeString(str);
636 SysFreeString(data);
639 return hr;
642 static HRESULT WINAPI domcomment_insertData(
643 IXMLDOMComment *iface,
644 LONG offset, BSTR p)
646 domcomment *This = impl_from_IXMLDOMComment( iface );
647 HRESULT hr;
648 BSTR data;
649 LONG p_len;
651 TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
653 /* If have a NULL or empty string, don't do anything. */
654 if((p_len = SysStringLen(p)) == 0)
655 return S_OK;
657 if(offset < 0)
659 return E_INVALIDARG;
662 hr = IXMLDOMComment_get_data(iface, &data);
663 if(hr == S_OK)
665 LONG len = SysStringLen(data);
666 BSTR str;
668 if(len < offset)
670 SysFreeString(data);
671 return E_INVALIDARG;
674 str = SysAllocStringLen(NULL, len + p_len);
675 /* start part, supplied string and end part */
676 memcpy(str, data, offset*sizeof(WCHAR));
677 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
678 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
679 str[len+p_len] = 0;
681 hr = IXMLDOMComment_put_data(iface, str);
683 SysFreeString(str);
684 SysFreeString(data);
687 return hr;
690 static HRESULT WINAPI domcomment_deleteData(
691 IXMLDOMComment *iface,
692 LONG offset, LONG count)
694 HRESULT hr;
695 LONG len = -1;
696 BSTR str;
698 TRACE("(%p)->(%d %d)\n", iface, offset, count);
700 hr = IXMLDOMComment_get_length(iface, &len);
701 if(hr != S_OK) return hr;
703 if((offset < 0) || (offset > len) || (count < 0))
704 return E_INVALIDARG;
706 if(len == 0) return S_OK;
708 /* cutting start or end */
709 if((offset == 0) || ((count + offset) >= len))
711 if(offset == 0)
712 IXMLDOMComment_substringData(iface, count, len - count, &str);
713 else
714 IXMLDOMComment_substringData(iface, 0, offset, &str);
715 hr = IXMLDOMComment_put_data(iface, str);
717 else
718 /* cutting from the inside */
720 BSTR str_end;
722 IXMLDOMComment_substringData(iface, 0, offset, &str);
723 IXMLDOMComment_substringData(iface, offset + count, len - count, &str_end);
725 hr = IXMLDOMComment_put_data(iface, str);
726 if(hr == S_OK)
727 hr = IXMLDOMComment_appendData(iface, str_end);
729 SysFreeString(str_end);
732 SysFreeString(str);
734 return hr;
737 static HRESULT WINAPI domcomment_replaceData(
738 IXMLDOMComment *iface,
739 LONG offset, LONG count, BSTR p)
741 domcomment *This = impl_from_IXMLDOMComment( iface );
742 HRESULT hr;
744 TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
746 hr = IXMLDOMComment_deleteData(iface, offset, count);
748 if (hr == S_OK)
749 hr = IXMLDOMComment_insertData(iface, offset, p);
751 return hr;
754 static const struct IXMLDOMCommentVtbl domcomment_vtbl =
756 domcomment_QueryInterface,
757 domcomment_AddRef,
758 domcomment_Release,
759 domcomment_GetTypeInfoCount,
760 domcomment_GetTypeInfo,
761 domcomment_GetIDsOfNames,
762 domcomment_Invoke,
763 domcomment_get_nodeName,
764 domcomment_get_nodeValue,
765 domcomment_put_nodeValue,
766 domcomment_get_nodeType,
767 domcomment_get_parentNode,
768 domcomment_get_childNodes,
769 domcomment_get_firstChild,
770 domcomment_get_lastChild,
771 domcomment_get_previousSibling,
772 domcomment_get_nextSibling,
773 domcomment_get_attributes,
774 domcomment_insertBefore,
775 domcomment_replaceChild,
776 domcomment_removeChild,
777 domcomment_appendChild,
778 domcomment_hasChildNodes,
779 domcomment_get_ownerDocument,
780 domcomment_cloneNode,
781 domcomment_get_nodeTypeString,
782 domcomment_get_text,
783 domcomment_put_text,
784 domcomment_get_specified,
785 domcomment_get_definition,
786 domcomment_get_nodeTypedValue,
787 domcomment_put_nodeTypedValue,
788 domcomment_get_dataType,
789 domcomment_put_dataType,
790 domcomment_get_xml,
791 domcomment_transformNode,
792 domcomment_selectNodes,
793 domcomment_selectSingleNode,
794 domcomment_get_parsed,
795 domcomment_get_namespaceURI,
796 domcomment_get_prefix,
797 domcomment_get_baseName,
798 domcomment_transformNodeToObject,
799 domcomment_get_data,
800 domcomment_put_data,
801 domcomment_get_length,
802 domcomment_substringData,
803 domcomment_appendData,
804 domcomment_insertData,
805 domcomment_deleteData,
806 domcomment_replaceData
809 IUnknown* create_comment( xmlNodePtr comment )
811 domcomment *This;
813 This = heap_alloc( sizeof *This );
814 if ( !This )
815 return NULL;
817 This->lpVtbl = &domcomment_vtbl;
818 This->ref = 1;
820 init_xmlnode(&This->node, comment, (IXMLDOMNode*)&This->lpVtbl, NULL);
822 return (IUnknown*) &This->lpVtbl;
825 #endif