ReactOS 0.4.16-dev-2208-g6350669
comment.c File Reference
#include <stdarg.h>
#include <libxml/parser.h>
#include <libxml/xmlerror.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "msxml6.h"
#include "msxml_private.h"
#include "wine/debug.h"
Include dependency graph for comment.c:

Go to the source code of this file.

Classes

struct  _domcomment
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct _domcomment domcomment
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msxml)
 
static domcommentimpl_from_IXMLDOMComment (IXMLDOMComment *iface)
 
static HRESULT WINAPI domcomment_QueryInterface (IXMLDOMComment *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI domcomment_AddRef (IXMLDOMComment *iface)
 
static ULONG WINAPI domcomment_Release (IXMLDOMComment *iface)
 
static HRESULT WINAPI domcomment_GetTypeInfoCount (IXMLDOMComment *iface, UINT *pctinfo)
 
static HRESULT WINAPI domcomment_GetTypeInfo (IXMLDOMComment *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI domcomment_GetIDsOfNames (IXMLDOMComment *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI domcomment_Invoke (IXMLDOMComment *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI domcomment_get_nodeName (IXMLDOMComment *iface, BSTR *p)
 
static HRESULT WINAPI domcomment_get_nodeValue (IXMLDOMComment *iface, VARIANT *value)
 
static HRESULT WINAPI domcomment_put_nodeValue (IXMLDOMComment *iface, VARIANT value)
 
static HRESULT WINAPI domcomment_get_nodeType (IXMLDOMComment *iface, DOMNodeType *domNodeType)
 
static HRESULT WINAPI domcomment_get_parentNode (IXMLDOMComment *iface, IXMLDOMNode **parent)
 
static HRESULT WINAPI domcomment_get_childNodes (IXMLDOMComment *iface, IXMLDOMNodeList **outList)
 
static HRESULT WINAPI domcomment_get_firstChild (IXMLDOMComment *iface, IXMLDOMNode **domNode)
 
static HRESULT WINAPI domcomment_get_lastChild (IXMLDOMComment *iface, IXMLDOMNode **domNode)
 
static HRESULT WINAPI domcomment_get_previousSibling (IXMLDOMComment *iface, IXMLDOMNode **domNode)
 
static HRESULT WINAPI domcomment_get_nextSibling (IXMLDOMComment *iface, IXMLDOMNode **domNode)
 
static HRESULT WINAPI domcomment_get_attributes (IXMLDOMComment *iface, IXMLDOMNamedNodeMap **attributeMap)
 
static HRESULT WINAPI domcomment_insertBefore (IXMLDOMComment *iface, IXMLDOMNode *newNode, VARIANT refChild, IXMLDOMNode **outOldNode)
 
static HRESULT WINAPI domcomment_replaceChild (IXMLDOMComment *iface, IXMLDOMNode *newNode, IXMLDOMNode *oldNode, IXMLDOMNode **outOldNode)
 
static HRESULT WINAPI domcomment_removeChild (IXMLDOMComment *iface, IXMLDOMNode *child, IXMLDOMNode **oldChild)
 
static HRESULT WINAPI domcomment_appendChild (IXMLDOMComment *iface, IXMLDOMNode *child, IXMLDOMNode **outChild)
 
static HRESULT WINAPI domcomment_hasChildNodes (IXMLDOMComment *iface, VARIANT_BOOL *ret)
 
static HRESULT WINAPI domcomment_get_ownerDocument (IXMLDOMComment *iface, IXMLDOMDocument **doc)
 
static HRESULT WINAPI domcomment_cloneNode (IXMLDOMComment *iface, VARIANT_BOOL deep, IXMLDOMNode **outNode)
 
static HRESULT WINAPI domcomment_get_nodeTypeString (IXMLDOMComment *iface, BSTR *p)
 
static HRESULT WINAPI domcomment_get_text (IXMLDOMComment *iface, BSTR *p)
 
static HRESULT WINAPI domcomment_put_text (IXMLDOMComment *iface, BSTR p)
 
static HRESULT WINAPI domcomment_get_specified (IXMLDOMComment *iface, VARIANT_BOOL *isSpecified)
 
static HRESULT WINAPI domcomment_get_definition (IXMLDOMComment *iface, IXMLDOMNode **definitionNode)
 
static HRESULT WINAPI domcomment_get_nodeTypedValue (IXMLDOMComment *iface, VARIANT *v)
 
static HRESULT WINAPI domcomment_put_nodeTypedValue (IXMLDOMComment *iface, VARIANT typedValue)
 
static HRESULT WINAPI domcomment_get_dataType (IXMLDOMComment *iface, VARIANT *typename)
 
static HRESULT WINAPI domcomment_put_dataType (IXMLDOMComment *iface, BSTR p)
 
static HRESULT WINAPI domcomment_get_xml (IXMLDOMComment *iface, BSTR *p)
 
static HRESULT WINAPI domcomment_transformNode (IXMLDOMComment *iface, IXMLDOMNode *node, BSTR *p)
 
static HRESULT WINAPI domcomment_selectNodes (IXMLDOMComment *iface, BSTR p, IXMLDOMNodeList **outList)
 
static HRESULT WINAPI domcomment_selectSingleNode (IXMLDOMComment *iface, BSTR p, IXMLDOMNode **outNode)
 
static HRESULT WINAPI domcomment_get_parsed (IXMLDOMComment *iface, VARIANT_BOOL *isParsed)
 
static HRESULT WINAPI domcomment_get_namespaceURI (IXMLDOMComment *iface, BSTR *p)
 
static HRESULT WINAPI domcomment_get_prefix (IXMLDOMComment *iface, BSTR *prefix)
 
static HRESULT WINAPI domcomment_get_baseName (IXMLDOMComment *iface, BSTR *name)
 
static HRESULT WINAPI domcomment_transformNodeToObject (IXMLDOMComment *iface, IXMLDOMNode *domNode, VARIANT var1)
 
static HRESULT WINAPI domcomment_get_data (IXMLDOMComment *iface, BSTR *p)
 
static HRESULT WINAPI domcomment_put_data (IXMLDOMComment *iface, BSTR data)
 
static HRESULT WINAPI domcomment_get_length (IXMLDOMComment *iface, LONG *len)
 
static HRESULT WINAPI domcomment_substringData (IXMLDOMComment *iface, LONG offset, LONG count, BSTR *p)
 
static HRESULT WINAPI domcomment_appendData (IXMLDOMComment *iface, BSTR p)
 
static HRESULT WINAPI domcomment_insertData (IXMLDOMComment *iface, LONG offset, BSTR p)
 
static HRESULT WINAPI domcomment_deleteData (IXMLDOMComment *iface, LONG offset, LONG count)
 
static HRESULT WINAPI domcomment_replaceData (IXMLDOMComment *iface, LONG offset, LONG count, BSTR p)
 
IUnknowncreate_comment (xmlNodePtr comment)
 

Variables

static const tid_t domcomment_se_tids []
 
static const struct IXMLDOMCommentVtbl domcomment_vtbl
 
static const tid_t domcomment_iface_tids []
 
static dispex_static_data_t domcomment_dispex
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file comment.c.

Typedef Documentation

◆ domcomment

Function Documentation

◆ create_comment()

IUnknown * create_comment ( xmlNodePtr  comment)

Definition at line 825 of file comment.c.

826{
828
829 This = malloc(sizeof(*This));
830 if ( !This )
831 return NULL;
832
833 This->IXMLDOMComment_iface.lpVtbl = &domcomment_vtbl;
834 This->ref = 1;
835
836 init_xmlnode(&This->node, comment, (IXMLDOMNode*)&This->IXMLDOMComment_iface, &domcomment_dispex);
837
838 return (IUnknown*)&This->IXMLDOMComment_iface;
839}
static const struct IXMLDOMCommentVtbl domcomment_vtbl
Definition: comment.c:758
static dispex_static_data_t domcomment_dispex
Definition: comment.c:818
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define comment(fmt, arg1)
Definition: rebar.c:847
void init_xmlnode(xmlnode *, xmlNodePtr, IXMLDOMNode *, dispex_static_data_t *)
Definition: node.c:1647

Referenced by create_node().

◆ domcomment_AddRef()

static ULONG WINAPI domcomment_AddRef ( IXMLDOMComment iface)
static

Definition at line 92 of file comment.c.

93{
96 TRACE("%p, refcount %lu.\n", iface, ref);
97 return ref;
98}
#define InterlockedIncrement
Definition: armddk.h:53
static domcomment * impl_from_IXMLDOMComment(IXMLDOMComment *iface)
Definition: comment.c:52
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ domcomment_appendChild()

static HRESULT WINAPI domcomment_appendChild ( IXMLDOMComment iface,
IXMLDOMNode child,
IXMLDOMNode **  outChild 
)
static

Definition at line 313 of file comment.c.

316{
318 TRACE("(%p)->(%p %p)\n", This, child, outChild);
319 return node_append_child(&This->node, child, outChild);
320}
static HWND child
Definition: cursoricon.c:298
HRESULT node_append_child(xmlnode *, IXMLDOMNode *, IXMLDOMNode **)
Definition: node.c:639

◆ domcomment_appendData()

static HRESULT WINAPI domcomment_appendData ( IXMLDOMComment iface,
BSTR  p 
)
static

Definition at line 615 of file comment.c.

618{
620 HRESULT hr;
621 BSTR data;
622 LONG p_len;
623
624 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
625
626 /* Nothing to do if NULL or an Empty string passed in. */
627 if((p_len = SysStringLen(p)) == 0) return S_OK;
628
629 hr = IXMLDOMComment_get_data(iface, &data);
630 if(hr == S_OK)
631 {
633 BSTR str = SysAllocStringLen(NULL, p_len + len);
634
635 memcpy(str, data, len*sizeof(WCHAR));
636 memcpy(&str[len], p, p_len*sizeof(WCHAR));
637 str[len+p_len] = 0;
638
639 hr = IXMLDOMComment_put_data(iface, str);
640
643 }
644
645 return hr;
646}
OLECHAR * BSTR
Definition: compat.h:2293
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:52
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
long LONG
Definition: pedump.c:60
const WCHAR * str
HRESULT hr
Definition: shlfolder.c:183
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ domcomment_cloneNode()

static HRESULT WINAPI domcomment_cloneNode ( IXMLDOMComment iface,
VARIANT_BOOL  deep,
IXMLDOMNode **  outNode 
)
static

Definition at line 340 of file comment.c.

343{
345 TRACE("(%p)->(%d %p)\n", This, deep, outNode);
346 return node_clone( &This->node, deep, outNode );
347}
HRESULT node_clone(xmlnode *, VARIANT_BOOL, IXMLDOMNode **)
Definition: node.c:679

◆ domcomment_deleteData()

static HRESULT WINAPI domcomment_deleteData ( IXMLDOMComment iface,
LONG  offset,
LONG  count 
)
static

Definition at line 695 of file comment.c.

698{
699 HRESULT hr;
700 LONG len = -1;
701 BSTR str;
702
703 TRACE("%p, %ld, %ld.\n", iface, offset, count);
704
705 hr = IXMLDOMComment_get_length(iface, &len);
706 if(hr != S_OK) return hr;
707
708 if((offset < 0) || (offset > len) || (count < 0))
709 return E_INVALIDARG;
710
711 if(len == 0) return S_OK;
712
713 /* cutting start or end */
714 if((offset == 0) || ((count + offset) >= len))
715 {
716 if(offset == 0)
717 IXMLDOMComment_substringData(iface, count, len - count, &str);
718 else
719 IXMLDOMComment_substringData(iface, 0, offset, &str);
720 hr = IXMLDOMComment_put_data(iface, str);
721 }
722 else
723 /* cutting from the inside */
724 {
725 BSTR str_end;
726
727 IXMLDOMComment_substringData(iface, 0, offset, &str);
728 IXMLDOMComment_substringData(iface, offset + count, len - count, &str_end);
729
730 hr = IXMLDOMComment_put_data(iface, str);
731 if(hr == S_OK)
732 hr = IXMLDOMComment_appendData(iface, str_end);
733
734 SysFreeString(str_end);
735 }
736
738
739 return hr;
740}
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLintptr offset
Definition: glext.h:5920

◆ domcomment_get_attributes()

static HRESULT WINAPI domcomment_get_attributes ( IXMLDOMComment iface,
IXMLDOMNamedNodeMap **  attributeMap 
)
static

Definition at line 268 of file comment.c.

271{
273
274 TRACE("(%p)->(%p)\n", This, attributeMap);
275
276 return return_null_ptr((void**)attributeMap);
277}
static HRESULT return_null_ptr(void **p)

◆ domcomment_get_baseName()

static HRESULT WINAPI domcomment_get_baseName ( IXMLDOMComment iface,
BSTR name 
)
static

Definition at line 505 of file comment.c.

508{
510 TRACE("(%p)->(%p)\n", This, name);
511 return return_null_bstr( name );
512}
static HRESULT return_null_bstr(BSTR *p)
Definition: name.c:39

◆ domcomment_get_childNodes()

static HRESULT WINAPI domcomment_get_childNodes ( IXMLDOMComment iface,
IXMLDOMNodeList **  outList 
)
static

Definition at line 213 of file comment.c.

216{
218
219 TRACE("(%p)->(%p)\n", This, outList);
220
221 return node_get_child_nodes(&This->node, outList);
222}
HRESULT node_get_child_nodes(xmlnode *, IXMLDOMNodeList **)
Definition: node.c:353

◆ domcomment_get_data()

static HRESULT WINAPI domcomment_get_data ( IXMLDOMComment iface,
BSTR p 
)
static

Definition at line 523 of file comment.c.

526{
528 HRESULT hr;
529 VARIANT vRet;
530
531 TRACE("(%p)->(%p)\n", This, p);
532
533 if(!p)
534 return E_INVALIDARG;
535
536 hr = IXMLDOMComment_get_nodeValue( iface, &vRet );
537 if(hr == S_OK)
538 {
539 *p = V_BSTR(&vRet);
540 }
541
542 return hr;
543}
#define V_BSTR(A)
Definition: oleauto.h:226

◆ domcomment_get_dataType()

static HRESULT WINAPI domcomment_get_dataType ( IXMLDOMComment iface,
VARIANT typename 
)
static

Definition at line 416 of file comment.c.

419{
421 TRACE("(%p)->(%p)\n", This, typename);
422 return return_null_var( typename );
423}
static HRESULT return_null_var(VARIANT *p)

◆ domcomment_get_definition()

static HRESULT WINAPI domcomment_get_definition ( IXMLDOMComment iface,
IXMLDOMNode **  definitionNode 
)
static

Definition at line 389 of file comment.c.

392{
394 FIXME("(%p)->(%p)\n", This, definitionNode);
395 return E_NOTIMPL;
396}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ domcomment_get_firstChild()

static HRESULT WINAPI domcomment_get_firstChild ( IXMLDOMComment iface,
IXMLDOMNode **  domNode 
)
static

Definition at line 224 of file comment.c.

227{
229
230 TRACE("(%p)->(%p)\n", This, domNode);
231
232 return return_null_node(domNode);
233}
static HRESULT return_null_node(IXMLDOMNode **p)

◆ domcomment_get_lastChild()

static HRESULT WINAPI domcomment_get_lastChild ( IXMLDOMComment iface,
IXMLDOMNode **  domNode 
)
static

Definition at line 235 of file comment.c.

238{
240
241 TRACE("(%p)->(%p)\n", This, domNode);
242
243 return return_null_node(domNode);
244}

◆ domcomment_get_length()

static HRESULT WINAPI domcomment_get_length ( IXMLDOMComment iface,
LONG len 
)
static

Definition at line 554 of file comment.c.

557{
559 HRESULT hr;
560 BSTR data;
561
562 TRACE("(%p)->(%p)\n", This, len);
563
564 if(!len)
565 return E_INVALIDARG;
566
567 hr = IXMLDOMComment_get_data(iface, &data);
568 if(hr == S_OK)
569 {
572 }
573
574 return hr;
575}

◆ domcomment_get_namespaceURI()

static HRESULT WINAPI domcomment_get_namespaceURI ( IXMLDOMComment iface,
BSTR p 
)
static

Definition at line 487 of file comment.c.

490{
492 TRACE("(%p)->(%p)\n", This, p);
493 return node_get_namespaceURI(&This->node, p);
494}
HRESULT node_get_namespaceURI(xmlnode *, BSTR *)
Definition: node.c:1589

◆ domcomment_get_nextSibling()

static HRESULT WINAPI domcomment_get_nextSibling ( IXMLDOMComment iface,
IXMLDOMNode **  domNode 
)
static

Definition at line 257 of file comment.c.

260{
262
263 TRACE("(%p)->(%p)\n", This, domNode);
264
265 return node_get_next_sibling(&This->node, domNode);
266}
HRESULT node_get_next_sibling(xmlnode *, IXMLDOMNode **)
Definition: node.c:380

◆ domcomment_get_nodeName()

static HRESULT WINAPI domcomment_get_nodeName ( IXMLDOMComment iface,
BSTR p 
)
static

Definition at line 155 of file comment.c.

158{
160
161 static const WCHAR commentW[] = {'#','c','o','m','m','e','n','t',0};
162
163 TRACE("(%p)->(%p)\n", This, p);
164
165 return return_bstr(commentW, p);
166}
static const WCHAR commentW[]
Definition: reader.c:97
static HRESULT return_bstr(const WCHAR *value, BSTR *p)
Definition: msxml_dispex.h:115

◆ domcomment_get_nodeType()

static HRESULT WINAPI domcomment_get_nodeType ( IXMLDOMComment iface,
DOMNodeType domNodeType 
)
static

Definition at line 190 of file comment.c.

193{
195
196 TRACE("(%p)->(%p)\n", This, domNodeType);
197
198 *domNodeType = NODE_COMMENT;
199 return S_OK;
200}
@ NODE_COMMENT
Definition: msxml6.idl:120

◆ domcomment_get_nodeTypedValue()

static HRESULT WINAPI domcomment_get_nodeTypedValue ( IXMLDOMComment iface,
VARIANT v 
)
static

Definition at line 398 of file comment.c.

401{
403 TRACE("(%p)->(%p)\n", This, v);
404 return node_get_content(&This->node, v);
405}
const GLdouble * v
Definition: gl.h:2040
HRESULT node_get_content(xmlnode *, VARIANT *)
Definition: node.c:225

◆ domcomment_get_nodeTypeString()

static HRESULT WINAPI domcomment_get_nodeTypeString ( IXMLDOMComment iface,
BSTR p 
)
static

Definition at line 349 of file comment.c.

352{
354 static const WCHAR commentW[] = {'c','o','m','m','e','n','t',0};
355
356 TRACE("(%p)->(%p)\n", This, p);
357
358 return return_bstr(commentW, p);
359}

◆ domcomment_get_nodeValue()

static HRESULT WINAPI domcomment_get_nodeValue ( IXMLDOMComment iface,
VARIANT value 
)
static

Definition at line 168 of file comment.c.

171{
173
174 TRACE("(%p)->(%p)\n", This, value);
175
176 return node_get_content(&This->node, value);
177}
Definition: pdh_main.c:96

◆ domcomment_get_ownerDocument()

static HRESULT WINAPI domcomment_get_ownerDocument ( IXMLDOMComment iface,
IXMLDOMDocument **  doc 
)
static

Definition at line 331 of file comment.c.

334{
336 TRACE("(%p)->(%p)\n", This, doc);
337 return node_get_owner_doc(&This->node, doc);
338}
HRESULT node_get_owner_doc(const xmlnode *, IXMLDOMDocument **)
Definition: node.c:672

◆ domcomment_get_parentNode()

static HRESULT WINAPI domcomment_get_parentNode ( IXMLDOMComment iface,
IXMLDOMNode **  parent 
)
static

Definition at line 202 of file comment.c.

205{
207
208 TRACE("(%p)->(%p)\n", This, parent);
209
210 return node_get_parent(&This->node, parent);
211}
r parent
Definition: btrfs.c:3010
HRESULT node_get_parent(xmlnode *, IXMLDOMNode **)
Definition: node.c:348

◆ domcomment_get_parsed()

static HRESULT WINAPI domcomment_get_parsed ( IXMLDOMComment iface,
VARIANT_BOOL isParsed 
)
static

Definition at line 477 of file comment.c.

480{
482 FIXME("(%p)->(%p) stub!\n", This, isParsed);
483 *isParsed = VARIANT_TRUE;
484 return S_OK;
485}

◆ domcomment_get_prefix()

static HRESULT WINAPI domcomment_get_prefix ( IXMLDOMComment iface,
BSTR prefix 
)
static

Definition at line 496 of file comment.c.

499{
501 TRACE("(%p)->(%p)\n", This, prefix);
502 return return_null_bstr( prefix );
503}
Character const *const prefix
Definition: tempnam.cpp:195

◆ domcomment_get_previousSibling()

static HRESULT WINAPI domcomment_get_previousSibling ( IXMLDOMComment iface,
IXMLDOMNode **  domNode 
)
static

Definition at line 246 of file comment.c.

249{
251
252 TRACE("(%p)->(%p)\n", This, domNode);
253
254 return node_get_previous_sibling(&This->node, domNode);
255}
HRESULT node_get_previous_sibling(xmlnode *, IXMLDOMNode **)
Definition: node.c:375

◆ domcomment_get_specified()

static HRESULT WINAPI domcomment_get_specified ( IXMLDOMComment iface,
VARIANT_BOOL isSpecified 
)
static

Definition at line 379 of file comment.c.

382{
384 FIXME("(%p)->(%p) stub!\n", This, isSpecified);
385 *isSpecified = VARIANT_TRUE;
386 return S_OK;
387}

◆ domcomment_get_text()

static HRESULT WINAPI domcomment_get_text ( IXMLDOMComment iface,
BSTR p 
)
static

Definition at line 361 of file comment.c.

364{
366 TRACE("(%p)->(%p)\n", This, p);
367 return node_get_text(&This->node, p);
368}
HRESULT node_get_text(const xmlnode *, BSTR *)
Definition: node.c:842

◆ domcomment_get_xml()

static HRESULT WINAPI domcomment_get_xml ( IXMLDOMComment iface,
BSTR p 
)
static

Definition at line 439 of file comment.c.

442{
444
445 TRACE("(%p)->(%p)\n", This, p);
446
447 return node_get_xml(&This->node, FALSE, p);
448}
#define FALSE
Definition: types.h:117
HRESULT node_get_xml(xmlnode *, BOOL, BSTR *)
Definition: node.c:936

◆ domcomment_GetIDsOfNames()

static HRESULT WINAPI domcomment_GetIDsOfNames ( IXMLDOMComment iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 134 of file comment.c.

138{
140 return IDispatchEx_GetIDsOfNames(&This->node.dispex.IDispatchEx_iface,
141 riid, rgszNames, cNames, lcid, rgDispId);
142}
LCID lcid
Definition: locale.c:5656
REFIID riid
Definition: atlbase.h:39

◆ domcomment_GetTypeInfo()

static HRESULT WINAPI domcomment_GetTypeInfo ( IXMLDOMComment iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 124 of file comment.c.

128{
130 return IDispatchEx_GetTypeInfo(&This->node.dispex.IDispatchEx_iface,
131 iTInfo, lcid, ppTInfo);
132}

◆ domcomment_GetTypeInfoCount()

static HRESULT WINAPI domcomment_GetTypeInfoCount ( IXMLDOMComment iface,
UINT pctinfo 
)
static

Definition at line 116 of file comment.c.

119{
121 return IDispatchEx_GetTypeInfoCount(&This->node.dispex.IDispatchEx_iface, pctinfo);
122}

◆ domcomment_hasChildNodes()

static HRESULT WINAPI domcomment_hasChildNodes ( IXMLDOMComment iface,
VARIANT_BOOL ret 
)
static

Definition at line 322 of file comment.c.

325{
327 TRACE("(%p)->(%p)\n", This, ret);
328 return return_var_false(ret);
329}
return ret
Definition: mutex.c:146
static HRESULT return_var_false(VARIANT_BOOL *p)

◆ domcomment_insertBefore()

static HRESULT WINAPI domcomment_insertBefore ( IXMLDOMComment iface,
IXMLDOMNode newNode,
VARIANT  refChild,
IXMLDOMNode **  outOldNode 
)
static

Definition at line 279 of file comment.c.

283{
285
286 FIXME("(%p)->(%p %s %p) needs test\n", This, newNode, debugstr_variant(&refChild), outOldNode);
287
288 return node_insert_before(&This->node, newNode, &refChild, outOldNode);
289}
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
HRESULT node_insert_before(xmlnode *, IXMLDOMNode *, const VARIANT *, IXMLDOMNode **)
Definition: node.c:432

◆ domcomment_insertData()

static HRESULT WINAPI domcomment_insertData ( IXMLDOMComment iface,
LONG  offset,
BSTR  p 
)
static

Definition at line 648 of file comment.c.

651{
652 HRESULT hr;
653 BSTR data;
654 LONG p_len;
655
656 TRACE("%p, %ld, %s.\n", iface, offset, debugstr_w(p));
657
658 /* If have a NULL or empty string, don't do anything. */
659 if((p_len = SysStringLen(p)) == 0)
660 return S_OK;
661
662 if(offset < 0)
663 {
664 return E_INVALIDARG;
665 }
666
667 hr = IXMLDOMComment_get_data(iface, &data);
668 if(hr == S_OK)
669 {
671 BSTR str;
672
673 if(len < offset)
674 {
676 return E_INVALIDARG;
677 }
678
679 str = SysAllocStringLen(NULL, len + p_len);
680 /* start part, supplied string and end part */
681 memcpy(str, data, offset*sizeof(WCHAR));
682 memcpy(&str[offset], p, p_len*sizeof(WCHAR));
683 memcpy(&str[offset+p_len], &data[offset], (len-offset)*sizeof(WCHAR));
684 str[len+p_len] = 0;
685
686 hr = IXMLDOMComment_put_data(iface, str);
687
690 }
691
692 return hr;
693}

◆ domcomment_Invoke()

static HRESULT WINAPI domcomment_Invoke ( IXMLDOMComment iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 144 of file comment.c.

149{
151 return IDispatchEx_Invoke(&This->node.dispex.IDispatchEx_iface,
152 dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
153}
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337

◆ domcomment_put_data()

static HRESULT WINAPI domcomment_put_data ( IXMLDOMComment iface,
BSTR  data 
)
static

Definition at line 545 of file comment.c.

548{
550 TRACE("(%p)->(%s)\n", This, debugstr_w(data));
551 return node_set_content(&This->node, data);
552}
HRESULT node_set_content(xmlnode *, LPCWSTR)
Definition: node.c:241

◆ domcomment_put_dataType()

static HRESULT WINAPI domcomment_put_dataType ( IXMLDOMComment iface,
BSTR  p 
)
static

Definition at line 425 of file comment.c.

428{
430
431 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
432
433 if(!p)
434 return E_INVALIDARG;
435
436 return E_FAIL;
437}
#define E_FAIL
Definition: ddrawi.h:102

◆ domcomment_put_nodeTypedValue()

static HRESULT WINAPI domcomment_put_nodeTypedValue ( IXMLDOMComment iface,
VARIANT  typedValue 
)
static

Definition at line 407 of file comment.c.

410{
412 FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue));
413 return E_NOTIMPL;
414}

◆ domcomment_put_nodeValue()

static HRESULT WINAPI domcomment_put_nodeValue ( IXMLDOMComment iface,
VARIANT  value 
)
static

Definition at line 179 of file comment.c.

182{
184
185 TRACE("(%p)->(%s)\n", This, debugstr_variant(&value));
186
187 return node_put_value(&This->node, &value);
188}
HRESULT node_put_value(xmlnode *, VARIANT *)
Definition: node.c:279

◆ domcomment_put_text()

static HRESULT WINAPI domcomment_put_text ( IXMLDOMComment iface,
BSTR  p 
)
static

Definition at line 370 of file comment.c.

373{
375 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
376 return node_put_text( &This->node, p );
377}
HRESULT node_put_text(xmlnode *, BSTR)
Definition: node.c:867

◆ domcomment_QueryInterface()

static HRESULT WINAPI domcomment_QueryInterface ( IXMLDOMComment iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 57 of file comment.c.

61{
63 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
64
65 if ( IsEqualGUID( riid, &IID_IXMLDOMComment ) ||
66 IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
67 IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
70 {
71 *ppvObject = iface;
72 }
73 else if(node_query_interface(&This->node, riid, ppvObject))
74 {
75 return *ppvObject ? S_OK : E_NOINTERFACE;
76 }
77 else if(IsEqualGUID( riid, &IID_ISupportErrorInfo ))
78 {
80 }
81 else
82 {
83 TRACE("Unsupported interface %s\n", debugstr_guid(riid));
84 *ppvObject = NULL;
85 return E_NOINTERFACE;
86 }
87
88 IXMLDOMComment_AddRef(iface);
89 return S_OK;
90}
const GUID IID_IUnknown
static const tid_t domcomment_se_tids[]
Definition: comment.c:46
#define debugstr_guid
Definition: kernel32.h:35
BOOL node_query_interface(xmlnode *, REFIID, void **)
Definition: node.c:66
HRESULT node_create_supporterrorinfo(const tid_t *, void **)
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ domcomment_Release()

static ULONG WINAPI domcomment_Release ( IXMLDOMComment iface)
static

Definition at line 100 of file comment.c.

101{
104
105 TRACE("%p, refcount %lu.\n", iface, ref);
106
107 if (!ref)
108 {
109 destroy_xmlnode(&comment->node);
110 free(comment);
111 }
112
113 return ref;
114}
#define InterlockedDecrement
Definition: armddk.h:52
#define free
Definition: debug_ros.c:5
void destroy_xmlnode(xmlnode *)
Definition: node.c:1638

◆ domcomment_removeChild()

static HRESULT WINAPI domcomment_removeChild ( IXMLDOMComment iface,
IXMLDOMNode child,
IXMLDOMNode **  oldChild 
)
static

Definition at line 304 of file comment.c.

307{
309 TRACE("(%p)->(%p %p)\n", This, child, oldChild);
310 return node_remove_child(&This->node, child, oldChild);
311}
HRESULT node_remove_child(xmlnode *, IXMLDOMNode *, IXMLDOMNode **)
Definition: node.c:608

◆ domcomment_replaceChild()

static HRESULT WINAPI domcomment_replaceChild ( IXMLDOMComment iface,
IXMLDOMNode newNode,
IXMLDOMNode oldNode,
IXMLDOMNode **  outOldNode 
)
static

Definition at line 291 of file comment.c.

296{
298
299 FIXME("(%p)->(%p %p %p) needs tests\n", This, newNode, oldNode, outOldNode);
300
301 return node_replace_child(&This->node, newNode, oldNode, outOldNode);
302}
HRESULT node_replace_child(xmlnode *, IXMLDOMNode *, IXMLDOMNode *, IXMLDOMNode **)
Definition: node.c:543

◆ domcomment_replaceData()

static HRESULT WINAPI domcomment_replaceData ( IXMLDOMComment iface,
LONG  offset,
LONG  count,
BSTR  p 
)
static

Definition at line 742 of file comment.c.

745{
746 HRESULT hr;
747
748 TRACE("%p, %ld, %ld, %s.\n", iface, offset, count, debugstr_w(p));
749
750 hr = IXMLDOMComment_deleteData(iface, offset, count);
751
752 if (hr == S_OK)
753 hr = IXMLDOMComment_insertData(iface, offset, p);
754
755 return hr;
756}

◆ domcomment_selectNodes()

static HRESULT WINAPI domcomment_selectNodes ( IXMLDOMComment iface,
BSTR  p,
IXMLDOMNodeList **  outList 
)
static

Definition at line 459 of file comment.c.

462{
464 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outList);
465 return node_select_nodes(&This->node, p, outList);
466}
HRESULT node_select_nodes(const xmlnode *, BSTR, IXMLDOMNodeList **)
Definition: node.c:1558

◆ domcomment_selectSingleNode()

static HRESULT WINAPI domcomment_selectSingleNode ( IXMLDOMComment iface,
BSTR  p,
IXMLDOMNode **  outNode 
)
static

Definition at line 468 of file comment.c.

471{
473 TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode);
474 return node_select_singlenode(&This->node, p, outNode);
475}
HRESULT node_select_singlenode(const xmlnode *, BSTR, IXMLDOMNode **)
Definition: node.c:1572

◆ domcomment_substringData()

static HRESULT WINAPI domcomment_substringData ( IXMLDOMComment iface,
LONG  offset,
LONG  count,
BSTR p 
)
static

Definition at line 577 of file comment.c.

578{
579 HRESULT hr;
580 BSTR data;
581
582 TRACE("%p, %ld, %ld, %p.\n", iface, offset, count, p);
583
584 if(!p)
585 return E_INVALIDARG;
586
587 *p = NULL;
588 if(offset < 0 || count < 0)
589 return E_INVALIDARG;
590
591 if(count == 0)
592 return S_FALSE;
593
594 hr = IXMLDOMComment_get_data(iface, &data);
595 if(hr == S_OK)
596 {
598
599 if(offset < len)
600 {
601 if(offset + count > len)
603 else
605 }
606 else
607 hr = S_FALSE;
608
610 }
611
612 return hr;
613}
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define S_FALSE
Definition: winerror.h:3451

◆ domcomment_transformNode()

static HRESULT WINAPI domcomment_transformNode ( IXMLDOMComment iface,
IXMLDOMNode node,
BSTR p 
)
static

Definition at line 450 of file comment.c.

453{
455 TRACE("(%p)->(%p %p)\n", This, node, p);
456 return node_transform_node(&This->node, node, p);
457}
HRESULT node_transform_node(const xmlnode *, IXMLDOMNode *, BSTR *)
Definition: node.c:1553
Definition: dlist.c:348

◆ domcomment_transformNodeToObject()

static HRESULT WINAPI domcomment_transformNodeToObject ( IXMLDOMComment iface,
IXMLDOMNode domNode,
VARIANT  var1 
)
static

Definition at line 514 of file comment.c.

517{
519 FIXME("(%p)->(%p %s)\n", This, domNode, debugstr_variant(&var1));
520 return E_NOTIMPL;
521}

◆ impl_from_IXMLDOMComment()

static domcomment * impl_from_IXMLDOMComment ( IXMLDOMComment iface)
inlinestatic

Definition at line 52 of file comment.c.

53{
54 return CONTAINING_RECORD(iface, domcomment, IXMLDOMComment_iface);
55}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by domcomment_AddRef(), domcomment_appendChild(), domcomment_appendData(), domcomment_cloneNode(), domcomment_get_attributes(), domcomment_get_baseName(), domcomment_get_childNodes(), domcomment_get_data(), domcomment_get_dataType(), domcomment_get_definition(), domcomment_get_firstChild(), domcomment_get_lastChild(), domcomment_get_length(), domcomment_get_namespaceURI(), domcomment_get_nextSibling(), domcomment_get_nodeName(), domcomment_get_nodeType(), domcomment_get_nodeTypedValue(), domcomment_get_nodeTypeString(), domcomment_get_nodeValue(), domcomment_get_ownerDocument(), domcomment_get_parentNode(), domcomment_get_parsed(), domcomment_get_prefix(), domcomment_get_previousSibling(), domcomment_get_specified(), domcomment_get_text(), domcomment_get_xml(), domcomment_GetIDsOfNames(), domcomment_GetTypeInfo(), domcomment_GetTypeInfoCount(), domcomment_hasChildNodes(), domcomment_insertBefore(), domcomment_Invoke(), domcomment_put_data(), domcomment_put_dataType(), domcomment_put_nodeTypedValue(), domcomment_put_nodeValue(), domcomment_put_text(), domcomment_QueryInterface(), domcomment_Release(), domcomment_removeChild(), domcomment_replaceChild(), domcomment_selectNodes(), domcomment_selectSingleNode(), domcomment_transformNode(), and domcomment_transformNodeToObject().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msxml  )

Variable Documentation

◆ domcomment_dispex

dispex_static_data_t domcomment_dispex
static
Initial value:
= {
}
static const tid_t domcomment_iface_tids[]
Definition: comment.c:813
@ IXMLDOMComment_tid
Definition: msxml_dispex.h:41

Definition at line 818 of file comment.c.

Referenced by create_comment().

◆ domcomment_iface_tids

const tid_t domcomment_iface_tids[]
static
Initial value:

Definition at line 813 of file comment.c.

◆ domcomment_se_tids

const tid_t domcomment_se_tids[]
static
Initial value:

Definition at line 46 of file comment.c.

Referenced by domcomment_QueryInterface().

◆ domcomment_vtbl

const struct IXMLDOMCommentVtbl domcomment_vtbl
static

Definition at line 758 of file comment.c.

Referenced by create_comment().