ReactOS 0.4.16-dev-2208-g6350669
xmlelem.c
Go to the documentation of this file.
1/*
2 * XML Element implementation
3 *
4 * Copyright 2007 James Hawkins
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#define COBJMACROS
22
23#include <stdarg.h>
24#include <libxml/parser.h>
25#include <libxml/xmlerror.h>
26
27#include "windef.h"
28#include "winbase.h"
29#include "winuser.h"
30#include "ole2.h"
31#include "msxml6.h"
32#include "ocidl.h"
33
34#include "wine/debug.h"
35
36#include "msxml_private.h"
37
39
40static HRESULT XMLElementCollection_create( xmlNodePtr node, LPVOID *ppObj );
41
42/**********************************************************************
43 * IXMLElement
44 */
45typedef struct _xmlelem
46{
47 IXMLElement IXMLElement_iface;
49 xmlNodePtr node;
52
53static inline xmlelem *impl_from_IXMLElement(IXMLElement *iface)
54{
55 return CONTAINING_RECORD(iface, xmlelem, IXMLElement_iface);
56}
57
58static HRESULT WINAPI xmlelem_QueryInterface(IXMLElement *iface, REFIID riid, void** ppvObject)
59{
61
62 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
63
66 IsEqualGUID(riid, &IID_IXMLElement))
67 {
68 *ppvObject = iface;
69 }
70 else
71 {
72 FIXME("interface %s not implemented\n", debugstr_guid(riid));
73 *ppvObject = NULL;
74 return E_NOINTERFACE;
75 }
76
77 IXMLElement_AddRef(iface);
78
79 return S_OK;
80}
81
82static ULONG WINAPI xmlelem_AddRef(IXMLElement *iface)
83{
85 TRACE("%p\n", This);
86 return InterlockedIncrement(&This->ref);
87}
88
89static ULONG WINAPI xmlelem_Release(IXMLElement *iface)
90{
92 LONG ref;
93
94 TRACE("%p\n", This);
95
97 if (ref == 0)
98 {
99 if (This->own) xmlFreeNode(This->node);
100 free(This);
101 }
102
103 return ref;
104}
105
106static HRESULT WINAPI xmlelem_GetTypeInfoCount(IXMLElement *iface, UINT* pctinfo)
107{
109
110 TRACE("(%p)->(%p)\n", This, pctinfo);
111
112 *pctinfo = 1;
113
114 return S_OK;
115}
116
117static HRESULT WINAPI xmlelem_GetTypeInfo(IXMLElement *iface, UINT iTInfo,
118 LCID lcid, ITypeInfo** ppTInfo)
119{
120 TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
121
122 return get_typeinfo(IXMLElement_tid, ppTInfo);
123}
124
125static HRESULT WINAPI xmlelem_GetIDsOfNames(IXMLElement *iface, REFIID riid,
126 LPOLESTR* rgszNames, UINT cNames,
127 LCID lcid, DISPID* rgDispId)
128{
130 HRESULT hr;
131
132 TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
133 lcid, rgDispId);
134
135 if(!rgszNames || cNames == 0 || !rgDispId)
136 return E_INVALIDARG;
137
139 if(SUCCEEDED(hr))
140 {
141 hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
142 ITypeInfo_Release(typeinfo);
143 }
144
145 return hr;
146}
147
148static HRESULT WINAPI xmlelem_Invoke(IXMLElement *iface, DISPID dispIdMember,
150 DISPPARAMS* pDispParams, VARIANT* pVarResult,
151 EXCEPINFO* pExcepInfo, UINT* puArgErr)
152{
154 HRESULT hr;
155
156 TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
157 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
158
160 if(SUCCEEDED(hr))
161 {
162 hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
163 ITypeInfo_Release(typeinfo);
164 }
165
166 return hr;
167}
168
169static HRESULT WINAPI xmlelem_get_tagName(IXMLElement *iface, BSTR *p)
170{
172
173 TRACE("(%p)->(%p)\n", This, p);
174
175 if (!p)
176 return E_INVALIDARG;
177
178 if (*This->node->name) {
179 *p = bstr_from_xmlChar(This->node->name);
181 }else {
182 *p = NULL;
183 }
184
185 TRACE("returning %s\n", debugstr_w(*p));
186
187 return S_OK;
188}
189
190static HRESULT WINAPI xmlelem_put_tagName(IXMLElement *iface, BSTR p)
191{
193
194 FIXME("(%p)->(%s): stub\n", This, debugstr_w(p));
195
196 if (!p)
197 return E_INVALIDARG;
198
199 return E_NOTIMPL;
200}
201
202static HRESULT WINAPI xmlelem_get_parent(IXMLElement *iface, IXMLElement **parent)
203{
205
206 TRACE("(%p)->(%p)\n", This, parent);
207
208 if (!parent)
209 return E_INVALIDARG;
210
211 *parent = NULL;
212
213 if (!This->node->parent)
214 return S_FALSE;
215
216 return XMLElement_create(This->node->parent, (LPVOID *)parent, FALSE);
217}
218
219static HRESULT WINAPI xmlelem_setAttribute(IXMLElement *iface, BSTR strPropertyName,
220 VARIANT PropertyValue)
221{
223 xmlChar *name, *value;
224 xmlAttrPtr attr;
225
226 TRACE("(%p)->(%s %s)\n", This, debugstr_w(strPropertyName), debugstr_variant(&PropertyValue));
227
228 if (!strPropertyName || V_VT(&PropertyValue) != VT_BSTR)
229 return E_INVALIDARG;
230
231 name = xmlchar_from_wchar(strPropertyName);
232 value = xmlchar_from_wchar(V_BSTR(&PropertyValue));
233 attr = xmlSetProp(This->node, name, value);
234
235 free(name);
236 free(value);
237 return (attr) ? S_OK : S_FALSE;
238}
239
240static HRESULT WINAPI xmlelem_getAttribute(IXMLElement *iface, BSTR name,
241 VARIANT *value)
242{
243 static const WCHAR xmllangW[] = { 'x','m','l',':','l','a','n','g',0 };
245 xmlChar *val = NULL;
246
247 TRACE("(%p)->(%s, %p)\n", This, debugstr_w(name), value);
248
249 if (!value)
250 return E_INVALIDARG;
251
253 V_BSTR(value) = NULL;
254
255 if (!name)
256 return E_INVALIDARG;
257
258 /* case for xml:lang attribute */
259 if (!lstrcmpiW(name, xmllangW))
260 {
261 xmlNsPtr ns;
262 ns = xmlSearchNs(This->node->doc, This->node, (xmlChar*)"xml");
263 val = xmlGetNsProp(This->node, (xmlChar*)"lang", ns->href);
264 }
265 else
266 {
267 xmlAttrPtr attr;
268 xmlChar *xml_name;
269
270 xml_name = xmlchar_from_wchar(name);
271 attr = This->node->properties;
272 while (attr)
273 {
274 BSTR attr_name;
275
276 attr_name = bstr_from_xmlChar(attr->name);
277 if (!lstrcmpiW(name, attr_name))
278 {
279 val = xmlNodeListGetString(attr->doc, attr->children, 1);
280 SysFreeString(attr_name);
281 break;
282 }
283
284 attr = attr->next;
285 SysFreeString(attr_name);
286 }
287
288 free(xml_name);
289 }
290
291 if (val)
292 {
293 V_VT(value) = VT_BSTR;
295 }
296
297 xmlFree(val);
298 TRACE("returning %s\n", debugstr_w(V_BSTR(value)));
299 return (val) ? S_OK : S_FALSE;
300}
301
302static HRESULT WINAPI xmlelem_removeAttribute(IXMLElement *iface, BSTR strPropertyName)
303{
305 xmlChar *name;
306 xmlAttrPtr attr;
307 int res;
309
310 TRACE("(%p)->(%s)\n", This, debugstr_w(strPropertyName));
311
312 if (!strPropertyName)
313 return E_INVALIDARG;
314
315 name = xmlchar_from_wchar(strPropertyName);
316 attr = xmlHasProp(This->node, name);
317 if (!attr)
318 goto done;
319
320 res = xmlRemoveProp(attr);
321
322 if (res == 0)
323 hr = S_OK;
324
325done:
326 free(name);
327 return hr;
328}
329
330static HRESULT WINAPI xmlelem_get_children(IXMLElement *iface, IXMLElementCollection **p)
331{
333
334 TRACE("(%p)->(%p)\n", This, p);
335
336 if (!p)
337 return E_INVALIDARG;
338
339 return XMLElementCollection_create(This->node, (LPVOID *)p);
340}
341
342static LONG type_libxml_to_msxml(xmlElementType type)
343{
344 switch (type)
345 {
346 case XML_ELEMENT_NODE:
347 return XMLELEMTYPE_ELEMENT;
348 case XML_TEXT_NODE:
349 return XMLELEMTYPE_TEXT;
350 case XML_COMMENT_NODE:
351 return XMLELEMTYPE_COMMENT;
352 case XML_DOCUMENT_NODE:
353 return XMLELEMTYPE_DOCUMENT;
354 case XML_DTD_NODE:
355 return XMLELEMTYPE_DTD;
356 case XML_PI_NODE:
357 return XMLELEMTYPE_PI;
358 default:
359 break;
360 }
361
362 return XMLELEMTYPE_OTHER;
363}
364
365static HRESULT WINAPI xmlelem_get_type(IXMLElement *iface, LONG *p)
366{
368
369 TRACE("(%p)->(%p)\n", This, p);
370
371 if (!p)
372 return E_INVALIDARG;
373
374 *p = type_libxml_to_msxml(This->node->type);
375 TRACE("returning %ld\n", *p);
376 return S_OK;
377}
378
379static HRESULT WINAPI xmlelem_get_text(IXMLElement *iface, BSTR *p)
380{
383
384 TRACE("(%p)->(%p)\n", This, p);
385
386 if (!p)
387 return E_INVALIDARG;
388
389 content = xmlNodeGetContent(This->node);
391 TRACE("returning %s\n", debugstr_w(*p));
392
394 return S_OK;
395}
396
397static HRESULT WINAPI xmlelem_put_text(IXMLElement *iface, BSTR p)
398{
401
402 TRACE("(%p)->(%s)\n", This, debugstr_w(p));
403
404 /* FIXME: test which types can be used */
405 if (This->node->type == XML_ELEMENT_NODE)
406 return E_NOTIMPL;
407
409 xmlNodeSetContent(This->node, content);
410
411 free(content);
412
413 return S_OK;
414}
415
416static HRESULT WINAPI xmlelem_addChild(IXMLElement *iface, IXMLElement *pChildElem,
417 LONG lIndex, LONG lreserved)
418{
420 xmlelem *childElem = impl_from_IXMLElement(pChildElem);
421 xmlNodePtr child;
422
423 TRACE("%p, %p, %ld, %ld.\n", iface, pChildElem, lIndex, lreserved);
424
425 if (lIndex == 0)
426 child = xmlAddChild(This->node, childElem->node);
427 else
428 child = xmlAddNextSibling(This->node, childElem->node->last);
429
430 /* parent is responsible for child data */
431 if (child) childElem->own = FALSE;
432
433 return (child) ? S_OK : S_FALSE;
434}
435
436static HRESULT WINAPI xmlelem_removeChild(IXMLElement *iface, IXMLElement *pChildElem)
437{
439 xmlelem *childElem = impl_from_IXMLElement(pChildElem);
440
441 TRACE("(%p)->(%p)\n", This, childElem);
442
443 if (!pChildElem)
444 return E_INVALIDARG;
445
446 /* only supported for This is childElem parent case */
447 if (This->node != childElem->node->parent)
448 return E_INVALIDARG;
449
450 xmlUnlinkNode(childElem->node);
451 /* standalone element now */
452 childElem->own = TRUE;
453
454 return S_OK;
455}
456
457static const struct IXMLElementVtbl xmlelem_vtbl =
458{
478};
479
480HRESULT XMLElement_create(xmlNodePtr node, LPVOID *ppObj, BOOL own)
481{
482 xmlelem *elem;
483
484 TRACE("(%p)\n", ppObj);
485
486 if (!ppObj)
487 return E_INVALIDARG;
488
489 *ppObj = NULL;
490
491 elem = malloc(sizeof(*elem));
492 if(!elem)
493 return E_OUTOFMEMORY;
494
495 elem->IXMLElement_iface.lpVtbl = &xmlelem_vtbl;
496 elem->ref = 1;
497 elem->node = node;
498 elem->own = own;
499
500 *ppObj = &elem->IXMLElement_iface;
501
502 TRACE("returning iface %p\n", *ppObj);
503 return S_OK;
504}
505
506/************************************************************************
507 * IXMLElementCollection
508 */
510{
511 IXMLElementCollection IXMLElementCollection_iface;
515 xmlNodePtr node;
516
517 /* IEnumVARIANT members */
518 xmlNodePtr current;
520
522{
523 xmlNodePtr ptr = collection->node->children;
524
525 collection->length = 0;
526 while (ptr)
527 {
528 collection->length++;
529 ptr = ptr->next;
530 }
531 return collection->length;
532}
533
534static inline xmlelem_collection *impl_from_IXMLElementCollection(IXMLElementCollection *iface)
535{
536 return CONTAINING_RECORD(iface, xmlelem_collection, IXMLElementCollection_iface);
537}
538
540{
541 return CONTAINING_RECORD(iface, xmlelem_collection, IEnumVARIANT_iface);
542}
543
544static HRESULT WINAPI xmlelem_collection_QueryInterface(IXMLElementCollection *iface, REFIID riid, void** ppvObject)
545{
547
548 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
549
551 IsEqualGUID(riid, &IID_IXMLElementCollection))
552 {
553 *ppvObject = iface;
554 }
555 else if (IsEqualGUID(riid, &IID_IEnumVARIANT))
556 {
557 *ppvObject = &This->IEnumVARIANT_iface;
558 }
559 else
560 {
561 FIXME("interface %s not implemented\n", debugstr_guid(riid));
562 *ppvObject = NULL;
563 return E_NOINTERFACE;
564 }
565
566 IXMLElementCollection_AddRef(iface);
567
568 return S_OK;
569}
570
571static ULONG WINAPI xmlelem_collection_AddRef(IXMLElementCollection *iface)
572{
574 TRACE("(%p)\n", This);
575 return InterlockedIncrement(&This->ref);
576}
577
578static ULONG WINAPI xmlelem_collection_Release(IXMLElementCollection *iface)
579{
581 LONG ref;
582
583 TRACE("(%p)\n", This);
584
586 if (ref == 0)
587 {
588 free(This);
589 }
590
591 return ref;
592}
593
594static HRESULT WINAPI xmlelem_collection_GetTypeInfoCount(IXMLElementCollection *iface, UINT* pctinfo)
595{
596 FIXME("\n");
597 return E_NOTIMPL;
598}
599
600static HRESULT WINAPI xmlelem_collection_GetTypeInfo(IXMLElementCollection *iface, UINT iTInfo,
601 LCID lcid, ITypeInfo** ppTInfo)
602{
603 FIXME("\n");
604 return E_NOTIMPL;
605}
606
607static HRESULT WINAPI xmlelem_collection_GetIDsOfNames(IXMLElementCollection *iface, REFIID riid,
608 LPOLESTR* rgszNames, UINT cNames,
609 LCID lcid, DISPID* rgDispId)
610{
611 FIXME("\n");
612 return E_NOTIMPL;
613}
614
615static HRESULT WINAPI xmlelem_collection_Invoke(IXMLElementCollection *iface, DISPID dispIdMember,
617 DISPPARAMS* pDispParams, VARIANT* pVarResult,
618 EXCEPINFO* pExcepInfo, UINT* puArgErr)
619{
620 FIXME("\n");
621 return E_NOTIMPL;
622}
623
624static HRESULT WINAPI xmlelem_collection_put_length(IXMLElementCollection *iface, LONG v)
625{
626 TRACE("%p, %ld.\n", iface, v);
627
628 return E_FAIL;
629}
630
631static HRESULT WINAPI xmlelem_collection_get_length(IXMLElementCollection *iface, LONG *p)
632{
634
635 TRACE("(%p)->(%p)\n", This, p);
636
637 if (!p)
638 return E_INVALIDARG;
639
641 return S_OK;
642}
643
644static HRESULT WINAPI xmlelem_collection_get__newEnum(IXMLElementCollection *iface, IUnknown **ppUnk)
645{
647
648 TRACE("(%p)->(%p)\n", This, ppUnk);
649
650 if (!ppUnk)
651 return E_INVALIDARG;
652
653 IXMLElementCollection_AddRef(iface);
654 *ppUnk = (IUnknown *)&This->IEnumVARIANT_iface;
655 return S_OK;
656}
657
658static HRESULT WINAPI xmlelem_collection_item(IXMLElementCollection *iface, VARIANT var1,
659 VARIANT var2, IDispatch **ppDisp)
660{
662 xmlNodePtr ptr = This->node->children;
663 int index, i;
664
665 TRACE("(%p)->(%s %s %p)\n", This, debugstr_variant(&var1), debugstr_variant(&var2), ppDisp);
666
667 if (!ppDisp)
668 return E_INVALIDARG;
669
670 *ppDisp = NULL;
671
672 index = V_I4(&var1);
673 if (index < 0)
674 return E_INVALIDARG;
675
677 if (index >= This->length)
678 return E_FAIL;
679
680 for (i = 0; i < index; i++)
681 ptr = ptr->next;
682
683 return XMLElement_create(ptr, (LPVOID *)ppDisp, FALSE);
684}
685
686static const struct IXMLElementCollectionVtbl xmlelem_collection_vtbl =
687{
699};
700
701/************************************************************************
702 * xmlelem_collection implementation of IEnumVARIANT.
703 */
705 IEnumVARIANT *iface, REFIID riid, LPVOID *ppvObj)
706{
708
709 TRACE("(%p)->(%s %p)\n", this, debugstr_guid(riid), ppvObj);
710
712 IsEqualGUID(riid, &IID_IEnumVARIANT))
713 {
714 *ppvObj = iface;
715 IEnumVARIANT_AddRef(iface);
716 return S_OK;
717 }
718
719 FIXME("interface %s not implemented\n", debugstr_guid(riid));
720 *ppvObj = NULL;
721 return E_NOINTERFACE;
722}
723
725 IEnumVARIANT *iface)
726{
728 return IXMLElementCollection_AddRef(&this->IXMLElementCollection_iface);
729}
730
732 IEnumVARIANT *iface)
733{
735 return IXMLElementCollection_Release(&this->IXMLElementCollection_iface);
736}
737
739 IEnumVARIANT *iface, ULONG celt, VARIANT *rgVar, ULONG *fetched)
740{
742 HRESULT hr;
743
744 TRACE("%p, %lu, %p, %p.\n", iface, celt, rgVar, fetched);
745
746 if (!rgVar)
747 return E_INVALIDARG;
748
749 if (fetched) *fetched = 0;
750
751 if (!This->current)
752 {
753 V_VT(rgVar) = VT_EMPTY;
754 return S_FALSE;
755 }
756
757 while (celt > 0 && This->current)
758 {
759 V_VT(rgVar) = VT_DISPATCH;
760 hr = XMLElement_create(This->current, (void **)&V_DISPATCH(rgVar), FALSE);
761 if (FAILED(hr)) return hr;
762 This->current = This->current->next;
763 if (fetched) ++*fetched;
764 rgVar++;
765 celt--;
766 }
767 if (!celt) return S_OK;
768 V_VT(rgVar) = VT_EMPTY;
769 return S_FALSE;
770}
771
773 IEnumVARIANT *iface, ULONG celt)
774{
775 FIXME("%p, %lu: stub\n", iface, celt);
776 return E_NOTIMPL;
777}
778
780 IEnumVARIANT *iface)
781{
783 TRACE("(%p)\n", This);
784 This->current = This->node->children;
785 return S_OK;
786}
787
789 IEnumVARIANT *iface, IEnumVARIANT **ppEnum)
790{
792 FIXME("(%p)->(%p): stub\n", This, ppEnum);
793 return E_NOTIMPL;
794}
795
796static const struct IEnumVARIANTVtbl xmlelem_collection_IEnumVARIANTvtbl =
797{
805};
806
808{
810
811 TRACE("(%p)\n", ppObj);
812
813 *ppObj = NULL;
814
815 if (!node->children)
816 return S_FALSE;
817
818 collection = malloc(sizeof(*collection));
819 if(!collection)
820 return E_OUTOFMEMORY;
821
822 collection->IXMLElementCollection_iface.lpVtbl = &xmlelem_collection_vtbl;
823 collection->IEnumVARIANT_iface.lpVtbl = &xmlelem_collection_IEnumVARIANTvtbl;
824 collection->ref = 1;
825 collection->length = 0;
826 collection->node = node;
827 collection->current = node->children;
829
830 *ppObj = &collection->IXMLElementCollection_iface;
831
832 TRACE("returning iface %p\n", *ppObj);
833 return S_OK;
834}
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define index(s, c)
Definition: various.h:29
#define FIXME(fmt,...)
Definition: precomp.h:53
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
content
Definition: atl_ax.c:994
OLECHAR * BSTR
Definition: compat.h:2293
@ VT_BSTR
Definition: compat.h:2303
@ VT_EMPTY
Definition: compat.h:2295
@ VT_DISPATCH
Definition: compat.h:2304
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4265
LCID lcid
Definition: locale.c:5656
DWORD WINAPI CharUpperBuffW(WCHAR *str, DWORD len)
Definition: string.c:1199
r parent
Definition: btrfs.c:3010
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint res
Definition: glext.h:9613
GLuint index
Definition: glext.h:6031
GLuint GLfloat * val
Definition: glext.h:7180
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
static PVOID ptr
Definition: dispmode.c:27
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
static size_t elem
Definition: string.c:71
static LPOLESTR
Definition: stg_prop.c:27
static ICollection collection
Definition: typelib.c:184
static VARIANTARG static DISPID
Definition: ordinal.c:49
static HWND child
Definition: cursoricon.c:298
@ IXMLElement_tid
Definition: msxml_dispex.h:59
static BSTR bstr_from_xmlChar(const xmlChar *str)
static xmlChar * xmlchar_from_wchar(const WCHAR *str)
unsigned int UINT
Definition: ndis.h:50
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define V_I4(A)
Definition: oleauto.h:247
#define V_DISPATCH(A)
Definition: oleauto.h:239
const GUID IID_IDispatch
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD LCID
Definition: nls.h:13
xmlFreeFunc xmlFree
Definition: globals.c:184
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
xmlNodePtr node
Definition: xmlelem.c:515
xmlNodePtr current
Definition: xmlelem.c:518
IXMLElementCollection IXMLElementCollection_iface
Definition: xmlelem.c:511
IEnumVARIANT IEnumVARIANT_iface
Definition: xmlelem.c:512
LONG ref
Definition: xmlelem.c:48
BOOL own
Definition: xmlelem.c:50
xmlNodePtr node
Definition: xmlelem.c:49
IXMLElement IXMLElement_iface
Definition: xmlelem.c:47
Definition: cookie.c:202
WCHAR * name
Definition: cookie.c:203
Definition: name.c:39
Definition: mxnamespace.c:38
Definition: send.c:48
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: dlist.c:348
Definition: pdh_main.c:96
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOINTERFACE
Definition: winerror.h:3479
static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_Skip(IEnumVARIANT *iface, ULONG celt)
Definition: xmlelem.c:772
static HRESULT WINAPI xmlelem_removeAttribute(IXMLElement *iface, BSTR strPropertyName)
Definition: xmlelem.c:302
static HRESULT WINAPI xmlelem_collection_put_length(IXMLElementCollection *iface, LONG v)
Definition: xmlelem.c:624
static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_Clone(IEnumVARIANT *iface, IEnumVARIANT **ppEnum)
Definition: xmlelem.c:788
static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_Reset(IEnumVARIANT *iface)
Definition: xmlelem.c:779
static ULONG WINAPI xmlelem_Release(IXMLElement *iface)
Definition: xmlelem.c:89
static HRESULT WINAPI xmlelem_put_text(IXMLElement *iface, BSTR p)
Definition: xmlelem.c:397
static HRESULT WINAPI xmlelem_QueryInterface(IXMLElement *iface, REFIID riid, void **ppvObject)
Definition: xmlelem.c:58
static HRESULT WINAPI xmlelem_getAttribute(IXMLElement *iface, BSTR name, VARIANT *value)
Definition: xmlelem.c:240
static HRESULT WINAPI xmlelem_collection_GetTypeInfoCount(IXMLElementCollection *iface, UINT *pctinfo)
Definition: xmlelem.c:594
static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_Next(IEnumVARIANT *iface, ULONG celt, VARIANT *rgVar, ULONG *fetched)
Definition: xmlelem.c:738
static ULONG WINAPI xmlelem_AddRef(IXMLElement *iface)
Definition: xmlelem.c:82
static HRESULT WINAPI xmlelem_get_text(IXMLElement *iface, BSTR *p)
Definition: xmlelem.c:379
static HRESULT WINAPI xmlelem_GetIDsOfNames(IXMLElement *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: xmlelem.c:125
static ULONG WINAPI xmlelem_collection_IEnumVARIANT_Release(IEnumVARIANT *iface)
Definition: xmlelem.c:731
static ULONG WINAPI xmlelem_collection_AddRef(IXMLElementCollection *iface)
Definition: xmlelem.c:571
static LONG type_libxml_to_msxml(xmlElementType type)
Definition: xmlelem.c:342
static HRESULT WINAPI xmlelem_collection_Invoke(IXMLElementCollection *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: xmlelem.c:615
static const struct IEnumVARIANTVtbl xmlelem_collection_IEnumVARIANTvtbl
Definition: xmlelem.c:796
static HRESULT WINAPI xmlelem_get_tagName(IXMLElement *iface, BSTR *p)
Definition: xmlelem.c:169
static HRESULT WINAPI xmlelem_collection_item(IXMLElementCollection *iface, VARIANT var1, VARIANT var2, IDispatch **ppDisp)
Definition: xmlelem.c:658
struct _xmlelem_collection xmlelem_collection
static HRESULT WINAPI xmlelem_get_parent(IXMLElement *iface, IXMLElement **parent)
Definition: xmlelem.c:202
static HRESULT XMLElementCollection_create(xmlNodePtr node, LPVOID *ppObj)
Definition: xmlelem.c:807
static HRESULT WINAPI xmlelem_collection_QueryInterface(IXMLElementCollection *iface, REFIID riid, void **ppvObject)
Definition: xmlelem.c:544
static xmlelem_collection * impl_from_IXMLElementCollection(IXMLElementCollection *iface)
Definition: xmlelem.c:534
HRESULT XMLElement_create(xmlNodePtr node, LPVOID *ppObj, BOOL own)
Definition: xmlelem.c:480
struct _xmlelem xmlelem
static HRESULT WINAPI xmlelem_collection_IEnumVARIANT_QueryInterface(IEnumVARIANT *iface, REFIID riid, LPVOID *ppvObj)
Definition: xmlelem.c:704
static HRESULT WINAPI xmlelem_removeChild(IXMLElement *iface, IXMLElement *pChildElem)
Definition: xmlelem.c:436
static HRESULT WINAPI xmlelem_GetTypeInfo(IXMLElement *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: xmlelem.c:117
static HRESULT WINAPI xmlelem_put_tagName(IXMLElement *iface, BSTR p)
Definition: xmlelem.c:190
static xmlelem * impl_from_IXMLElement(IXMLElement *iface)
Definition: xmlelem.c:53
static HRESULT WINAPI xmlelem_addChild(IXMLElement *iface, IXMLElement *pChildElem, LONG lIndex, LONG lreserved)
Definition: xmlelem.c:416
static HRESULT WINAPI xmlelem_collection_GetTypeInfo(IXMLElementCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: xmlelem.c:600
static ULONG WINAPI xmlelem_collection_IEnumVARIANT_AddRef(IEnumVARIANT *iface)
Definition: xmlelem.c:724
static ULONG WINAPI xmlelem_collection_Release(IXMLElementCollection *iface)
Definition: xmlelem.c:578
static const struct IXMLElementVtbl xmlelem_vtbl
Definition: xmlelem.c:457
static HRESULT WINAPI xmlelem_Invoke(IXMLElement *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: xmlelem.c:148
static HRESULT WINAPI xmlelem_collection_get_length(IXMLElementCollection *iface, LONG *p)
Definition: xmlelem.c:631
static const struct IXMLElementCollectionVtbl xmlelem_collection_vtbl
Definition: xmlelem.c:686
static HRESULT WINAPI xmlelem_collection_GetIDsOfNames(IXMLElementCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: xmlelem.c:607
static LONG xmlelem_collection_updatelength(xmlelem_collection *collection)
Definition: xmlelem.c:521
static HRESULT WINAPI xmlelem_get_type(IXMLElement *iface, LONG *p)
Definition: xmlelem.c:365
static HRESULT WINAPI xmlelem_setAttribute(IXMLElement *iface, BSTR strPropertyName, VARIANT PropertyValue)
Definition: xmlelem.c:219
static xmlelem_collection * impl_from_IEnumVARIANT(IEnumVARIANT *iface)
Definition: xmlelem.c:539
static HRESULT WINAPI xmlelem_collection_get__newEnum(IXMLElementCollection *iface, IUnknown **ppUnk)
Definition: xmlelem.c:644
static HRESULT WINAPI xmlelem_get_children(IXMLElement *iface, IXMLElementCollection **p)
Definition: xmlelem.c:330
static HRESULT WINAPI xmlelem_GetTypeInfoCount(IXMLElement *iface, UINT *pctinfo)
Definition: xmlelem.c:106
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char xmlChar
Definition: xmlstring.h:28