ipconfig: Update Korean resource.
[wine.git] / dlls / msxml3 / comment.c
blobd6a40f19f18b720f7f14965d8973dbc9070481cf
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 refChild,
309 IXMLDOMNode** outOldNode)
311 domcomment *This = impl_from_IXMLDOMComment( iface );
313 FIXME("(%p)->(%p x%d %p) needs test\n", This, newNode, V_VT(&refChild), outOldNode);
315 return node_insert_before(&This->node, newNode, &refChild, outOldNode);
318 static HRESULT WINAPI domcomment_replaceChild(
319 IXMLDOMComment *iface,
320 IXMLDOMNode* newNode,
321 IXMLDOMNode* oldNode,
322 IXMLDOMNode** outOldNode)
324 domcomment *This = impl_from_IXMLDOMComment( iface );
325 return IXMLDOMNode_replaceChild( IXMLDOMNode_from_impl(&This->node), newNode, oldNode, outOldNode );
328 static HRESULT WINAPI domcomment_removeChild(
329 IXMLDOMComment *iface,
330 IXMLDOMNode* domNode, IXMLDOMNode** oldNode)
332 domcomment *This = impl_from_IXMLDOMComment( iface );
333 return IXMLDOMNode_removeChild( IXMLDOMNode_from_impl(&This->node), domNode, oldNode );
336 static HRESULT WINAPI domcomment_appendChild(
337 IXMLDOMComment *iface,
338 IXMLDOMNode* newNode, IXMLDOMNode** outNewNode)
340 domcomment *This = impl_from_IXMLDOMComment( iface );
341 return IXMLDOMNode_appendChild( IXMLDOMNode_from_impl(&This->node), newNode, outNewNode );
344 static HRESULT WINAPI domcomment_hasChildNodes(
345 IXMLDOMComment *iface,
346 VARIANT_BOOL* pbool)
348 domcomment *This = impl_from_IXMLDOMComment( iface );
349 return IXMLDOMNode_hasChildNodes( IXMLDOMNode_from_impl(&This->node), pbool );
352 static HRESULT WINAPI domcomment_get_ownerDocument(
353 IXMLDOMComment *iface,
354 IXMLDOMDocument** domDocument)
356 domcomment *This = impl_from_IXMLDOMComment( iface );
357 return IXMLDOMNode_get_ownerDocument( IXMLDOMNode_from_impl(&This->node), domDocument );
360 static HRESULT WINAPI domcomment_cloneNode(
361 IXMLDOMComment *iface,
362 VARIANT_BOOL pbool, IXMLDOMNode** outNode)
364 domcomment *This = impl_from_IXMLDOMComment( iface );
365 return IXMLDOMNode_cloneNode( IXMLDOMNode_from_impl(&This->node), pbool, outNode );
368 static HRESULT WINAPI domcomment_get_nodeTypeString(
369 IXMLDOMComment *iface,
370 BSTR* p)
372 domcomment *This = impl_from_IXMLDOMComment( iface );
373 return IXMLDOMNode_get_nodeTypeString( IXMLDOMNode_from_impl(&This->node), p );
376 static HRESULT WINAPI domcomment_get_text(
377 IXMLDOMComment *iface,
378 BSTR* p)
380 domcomment *This = impl_from_IXMLDOMComment( iface );
381 return IXMLDOMNode_get_text( IXMLDOMNode_from_impl(&This->node), p );
384 static HRESULT WINAPI domcomment_put_text(
385 IXMLDOMComment *iface,
386 BSTR p)
388 domcomment *This = impl_from_IXMLDOMComment( iface );
389 return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p );
392 static HRESULT WINAPI domcomment_get_specified(
393 IXMLDOMComment *iface,
394 VARIANT_BOOL* pbool)
396 domcomment *This = impl_from_IXMLDOMComment( iface );
397 return IXMLDOMNode_get_specified( IXMLDOMNode_from_impl(&This->node), pbool );
400 static HRESULT WINAPI domcomment_get_definition(
401 IXMLDOMComment *iface,
402 IXMLDOMNode** domNode)
404 domcomment *This = impl_from_IXMLDOMComment( iface );
405 return IXMLDOMNode_get_definition( IXMLDOMNode_from_impl(&This->node), domNode );
408 static HRESULT WINAPI domcomment_get_nodeTypedValue(
409 IXMLDOMComment *iface,
410 VARIANT* var1)
412 domcomment *This = impl_from_IXMLDOMComment( iface );
413 return IXMLDOMNode_get_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
416 static HRESULT WINAPI domcomment_put_nodeTypedValue(
417 IXMLDOMComment *iface,
418 VARIANT var1)
420 domcomment *This = impl_from_IXMLDOMComment( iface );
421 return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 );
424 static HRESULT WINAPI domcomment_get_dataType(
425 IXMLDOMComment *iface,
426 VARIANT* var1)
428 domcomment *This = impl_from_IXMLDOMComment( iface );
429 return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
432 static HRESULT WINAPI domcomment_put_dataType(
433 IXMLDOMComment *iface,
434 BSTR p)
436 domcomment *This = impl_from_IXMLDOMComment( iface );
437 return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p );
440 static HRESULT WINAPI domcomment_get_xml(
441 IXMLDOMComment *iface,
442 BSTR* p)
444 domcomment *This = impl_from_IXMLDOMComment( iface );
445 return IXMLDOMNode_get_xml( IXMLDOMNode_from_impl(&This->node), p );
448 static HRESULT WINAPI domcomment_transformNode(
449 IXMLDOMComment *iface,
450 IXMLDOMNode* domNode, BSTR* p)
452 domcomment *This = impl_from_IXMLDOMComment( iface );
453 return IXMLDOMNode_transformNode( IXMLDOMNode_from_impl(&This->node), domNode, p );
456 static HRESULT WINAPI domcomment_selectNodes(
457 IXMLDOMComment *iface,
458 BSTR p, IXMLDOMNodeList** outList)
460 domcomment *This = impl_from_IXMLDOMComment( iface );
461 return IXMLDOMNode_selectNodes( IXMLDOMNode_from_impl(&This->node), p, outList );
464 static HRESULT WINAPI domcomment_selectSingleNode(
465 IXMLDOMComment *iface,
466 BSTR p, IXMLDOMNode** outNode)
468 domcomment *This = impl_from_IXMLDOMComment( iface );
469 return IXMLDOMNode_selectSingleNode( IXMLDOMNode_from_impl(&This->node), p, outNode );
472 static HRESULT WINAPI domcomment_get_parsed(
473 IXMLDOMComment *iface,
474 VARIANT_BOOL* pbool)
476 domcomment *This = impl_from_IXMLDOMComment( iface );
477 return IXMLDOMNode_get_parsed( IXMLDOMNode_from_impl(&This->node), pbool );
480 static HRESULT WINAPI domcomment_get_namespaceURI(
481 IXMLDOMComment *iface,
482 BSTR* p)
484 domcomment *This = impl_from_IXMLDOMComment( iface );
485 return IXMLDOMNode_get_namespaceURI( IXMLDOMNode_from_impl(&This->node), p );
488 static HRESULT WINAPI domcomment_get_prefix(
489 IXMLDOMComment *iface,
490 BSTR* p)
492 domcomment *This = impl_from_IXMLDOMComment( iface );
493 return IXMLDOMNode_get_prefix( IXMLDOMNode_from_impl(&This->node), p );
496 static HRESULT WINAPI domcomment_get_baseName(
497 IXMLDOMComment *iface,
498 BSTR* p)
500 domcomment *This = impl_from_IXMLDOMComment( iface );
501 return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
504 static HRESULT WINAPI domcomment_transformNodeToObject(
505 IXMLDOMComment *iface,
506 IXMLDOMNode* domNode, VARIANT var1)
508 domcomment *This = impl_from_IXMLDOMComment( iface );
509 return IXMLDOMNode_transformNodeToObject( IXMLDOMNode_from_impl(&This->node), domNode, var1 );
512 static HRESULT WINAPI domcomment_get_data(
513 IXMLDOMComment *iface,
514 BSTR *p)
516 domcomment *This = impl_from_IXMLDOMComment( iface );
517 HRESULT hr;
518 VARIANT vRet;
520 TRACE("(%p)->(%p)\n", This, p);
522 if(!p)
523 return E_INVALIDARG;
525 hr = IXMLDOMComment_get_nodeValue( iface, &vRet );
526 if(hr == S_OK)
528 *p = V_BSTR(&vRet);
531 return hr;
534 static HRESULT WINAPI domcomment_put_data(
535 IXMLDOMComment *iface,
536 BSTR data)
538 domcomment *This = impl_from_IXMLDOMComment( iface );
539 VARIANT val;
541 TRACE("(%p)->(%s)\n", This, debugstr_w(data) );
543 V_VT(&val) = VT_BSTR;
544 V_BSTR(&val) = data;
545 return node_put_value(&This->node, &val);
548 static HRESULT WINAPI domcomment_get_length(
549 IXMLDOMComment *iface,
550 LONG *len)
552 domcomment *This = impl_from_IXMLDOMComment( iface );
553 HRESULT hr;
554 BSTR data;
556 TRACE("(%p)->(%p)\n", This, len);
558 if(!len)
559 return E_INVALIDARG;
561 hr = IXMLDOMComment_get_data(iface, &data);
562 if(hr == S_OK)
564 *len = SysStringLen(data);
565 SysFreeString(data);
568 return hr;
571 static HRESULT WINAPI domcomment_substringData(
572 IXMLDOMComment *iface,
573 LONG offset, LONG count, BSTR *p)
575 domcomment *This = impl_from_IXMLDOMComment( iface );
576 HRESULT hr;
577 BSTR data;
579 TRACE("(%p)->(%d %d %p)\n", This, offset, count, p);
581 if(!p)
582 return E_INVALIDARG;
584 *p = NULL;
585 if(offset < 0 || count < 0)
586 return E_INVALIDARG;
588 if(count == 0)
589 return S_FALSE;
591 hr = IXMLDOMComment_get_data(iface, &data);
592 if(hr == S_OK)
594 LONG len = SysStringLen(data);
596 if(offset < len)
598 if(offset + count > len)
599 *p = SysAllocString(&data[offset]);
600 else
601 *p = SysAllocStringLen(&data[offset], count);
603 else
604 hr = S_FALSE;
606 SysFreeString(data);
609 return hr;
612 static HRESULT WINAPI domcomment_appendData(
613 IXMLDOMComment *iface,
614 BSTR p)
616 domcomment *This = impl_from_IXMLDOMComment( iface );
617 HRESULT hr;
618 BSTR data;
619 LONG p_len;
621 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
623 /* Nothing to do if NULL or an Empty string passed in. */
624 if((p_len = SysStringLen(p)) == 0) return S_OK;
626 hr = IXMLDOMComment_get_data(iface, &data);
627 if(hr == S_OK)
629 LONG len = SysStringLen(data);
630 BSTR str = SysAllocStringLen(NULL, p_len + len);
632 memcpy(str, data, len*sizeof(WCHAR));
633 memcpy(&str[len], p, p_len*sizeof(WCHAR));
634 str[len+p_len] = 0;
636 hr = IXMLDOMComment_put_data(iface, str);
638 SysFreeString(str);
639 SysFreeString(data);
642 return hr;
645 static HRESULT WINAPI domcomment_insertData(
646 IXMLDOMComment *iface,
647 LONG offset, BSTR p)
649 domcomment *This = impl_from_IXMLDOMComment( iface );
650 HRESULT hr;
651 BSTR data;
652 LONG p_len;
654 TRACE("(%p)->(%d %s)\n", This, offset, debugstr_w(p));
656 /* If have a NULL or empty string, don't do anything. */
657 if((p_len = SysStringLen(p)) == 0)
658 return S_OK;
660 if(offset < 0)
662 return E_INVALIDARG;
665 hr = IXMLDOMComment_get_data(iface, &data);
666 if(hr == S_OK)
668 LONG len = SysStringLen(data);
669 BSTR str;
671 if(len < offset)
673 SysFreeString(data);
674 return E_INVALIDARG;
677 str = SysAllocStringLen(NULL, len + p_len);
678 /* start part, supplied string and end part */
679 memcpy(str, data, offset*sizeof(WCHAR));
680 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
681 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
682 str[len+p_len] = 0;
684 hr = IXMLDOMComment_put_data(iface, str);
686 SysFreeString(str);
687 SysFreeString(data);
690 return hr;
693 static HRESULT WINAPI domcomment_deleteData(
694 IXMLDOMComment *iface,
695 LONG offset, LONG count)
697 HRESULT hr;
698 LONG len = -1;
699 BSTR str;
701 TRACE("(%p)->(%d %d)\n", iface, offset, count);
703 hr = IXMLDOMComment_get_length(iface, &len);
704 if(hr != S_OK) return hr;
706 if((offset < 0) || (offset > len) || (count < 0))
707 return E_INVALIDARG;
709 if(len == 0) return S_OK;
711 /* cutting start or end */
712 if((offset == 0) || ((count + offset) >= len))
714 if(offset == 0)
715 IXMLDOMComment_substringData(iface, count, len - count, &str);
716 else
717 IXMLDOMComment_substringData(iface, 0, offset, &str);
718 hr = IXMLDOMComment_put_data(iface, str);
720 else
721 /* cutting from the inside */
723 BSTR str_end;
725 IXMLDOMComment_substringData(iface, 0, offset, &str);
726 IXMLDOMComment_substringData(iface, offset + count, len - count, &str_end);
728 hr = IXMLDOMComment_put_data(iface, str);
729 if(hr == S_OK)
730 hr = IXMLDOMComment_appendData(iface, str_end);
732 SysFreeString(str_end);
735 SysFreeString(str);
737 return hr;
740 static HRESULT WINAPI domcomment_replaceData(
741 IXMLDOMComment *iface,
742 LONG offset, LONG count, BSTR p)
744 domcomment *This = impl_from_IXMLDOMComment( iface );
745 HRESULT hr;
747 TRACE("(%p)->(%d %d %s)\n", This, offset, count, debugstr_w(p));
749 hr = IXMLDOMComment_deleteData(iface, offset, count);
751 if (hr == S_OK)
752 hr = IXMLDOMComment_insertData(iface, offset, p);
754 return hr;
757 static const struct IXMLDOMCommentVtbl domcomment_vtbl =
759 domcomment_QueryInterface,
760 domcomment_AddRef,
761 domcomment_Release,
762 domcomment_GetTypeInfoCount,
763 domcomment_GetTypeInfo,
764 domcomment_GetIDsOfNames,
765 domcomment_Invoke,
766 domcomment_get_nodeName,
767 domcomment_get_nodeValue,
768 domcomment_put_nodeValue,
769 domcomment_get_nodeType,
770 domcomment_get_parentNode,
771 domcomment_get_childNodes,
772 domcomment_get_firstChild,
773 domcomment_get_lastChild,
774 domcomment_get_previousSibling,
775 domcomment_get_nextSibling,
776 domcomment_get_attributes,
777 domcomment_insertBefore,
778 domcomment_replaceChild,
779 domcomment_removeChild,
780 domcomment_appendChild,
781 domcomment_hasChildNodes,
782 domcomment_get_ownerDocument,
783 domcomment_cloneNode,
784 domcomment_get_nodeTypeString,
785 domcomment_get_text,
786 domcomment_put_text,
787 domcomment_get_specified,
788 domcomment_get_definition,
789 domcomment_get_nodeTypedValue,
790 domcomment_put_nodeTypedValue,
791 domcomment_get_dataType,
792 domcomment_put_dataType,
793 domcomment_get_xml,
794 domcomment_transformNode,
795 domcomment_selectNodes,
796 domcomment_selectSingleNode,
797 domcomment_get_parsed,
798 domcomment_get_namespaceURI,
799 domcomment_get_prefix,
800 domcomment_get_baseName,
801 domcomment_transformNodeToObject,
802 domcomment_get_data,
803 domcomment_put_data,
804 domcomment_get_length,
805 domcomment_substringData,
806 domcomment_appendData,
807 domcomment_insertData,
808 domcomment_deleteData,
809 domcomment_replaceData
812 IUnknown* create_comment( xmlNodePtr comment )
814 domcomment *This;
816 This = heap_alloc( sizeof *This );
817 if ( !This )
818 return NULL;
820 This->lpVtbl = &domcomment_vtbl;
821 This->ref = 1;
823 init_xmlnode(&This->node, comment, (IXMLDOMNode*)&This->lpVtbl, NULL);
825 return (IUnknown*) &This->lpVtbl;
828 #endif