ReactOS  0.4.15-dev-1049-g1062a29
dispex.c
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #define COBJMACROS
20 
21 #include "config.h"
22 
23 #include <stdarg.h>
24 #ifdef HAVE_LIBXML2
25 # include <libxml/parser.h>
26 # include <libxml/xmlerror.h>
27 #endif
28 
29 #include "windef.h"
30 #include "winbase.h"
31 #include "winuser.h"
32 #include "winnls.h"
33 #include "ole2.h"
34 #include "msxml6.h"
35 #include "msxml6did.h"
36 #include "wininet.h"
37 #include "urlmon.h"
38 #include "winreg.h"
39 #include "shlwapi.h"
40 
41 #include "wine/debug.h"
42 #include "wine/unicode.h"
43 
44 #include "msxml_private.h"
45 
47 
50 {
51  0, 0, &cs_dispex_static_data,
53  0, 0, { (DWORD_PTR)(__FILE__ ": dispex_static_data") }
54 };
56 
57 
59 {
60  LibXml = 0,
63 };
64 
65 typedef struct {
67  enum lib_version_t lib;
68 } tid_id_t;
69 
70 typedef struct {
72  unsigned short major;
73 } lib_id_t;
74 
75 typedef struct {
76  DISPID id;
77  BSTR name;
78  enum tid_t tid;
79 } func_info_t;
80 
81 struct dispex_data_t {
85 
86  struct list entry;
87 };
88 
92 
93 /* indexed with lib_version_t values */
94 static lib_id_t lib_ids[] = {
95  { &LIBID_MSXML, 2 },
96  { &LIBID_MSXML2, 3 }
97 };
98 
99 static tid_id_t tid_ids[] = {
100  { &IID_NULL, LibXml_Last },
101  { &IID_IXMLDOMAttribute, LibXml2 },
102  { &IID_IXMLDOMCDATASection, LibXml2 },
103  { &IID_IXMLDOMComment, LibXml2 },
104  { &IID_IXMLDOMDocument, LibXml2 },
105  { &IID_IXMLDOMDocument2, LibXml2 },
106  { &IID_IXMLDOMDocument3, LibXml2 },
107  { &IID_IXMLDOMDocumentFragment, LibXml2 },
108  { &IID_IXMLDOMDocumentType, LibXml2 },
109  { &IID_IXMLDOMElement, LibXml2 },
110  { &IID_IXMLDOMEntityReference, LibXml2 },
111  { &IID_IXMLDOMImplementation, LibXml2 },
112  { &IID_IXMLDOMNamedNodeMap, LibXml2 },
113  { &IID_IXMLDOMNode, LibXml2 },
114  { &IID_IXMLDOMNodeList, LibXml2 },
115  { &IID_IXMLDOMParseError2, LibXml2 },
116  { &IID_IXMLDOMProcessingInstruction, LibXml2 },
117  { &IID_IXMLDOMSchemaCollection, LibXml2 },
118  { &IID_IXMLDOMSchemaCollection2, LibXml2 },
119  { &IID_IXMLDOMSelection, LibXml2 },
120  { &IID_IXMLDOMText, LibXml2 },
121  { &IID_IXMLElement, LibXml },
122  { &IID_IXMLDocument, LibXml },
123  { &IID_IXMLHTTPRequest, LibXml2 },
124  { &IID_IXSLProcessor, LibXml2 },
125  { &IID_IXSLTemplate, LibXml2 },
126  { &IID_IVBSAXAttributes, LibXml2 },
127  { &IID_IVBSAXContentHandler, LibXml2 },
128  { &IID_IVBSAXDeclHandler, LibXml2 },
129  { &IID_IVBSAXDTDHandler, LibXml2 },
130  { &IID_IVBSAXEntityResolver, LibXml2 },
131  { &IID_IVBSAXErrorHandler, LibXml2 },
132  { &IID_IVBSAXLexicalHandler, LibXml2 },
133  { &IID_IVBSAXLocator, LibXml2 },
134  { &IID_IVBSAXXMLFilter, LibXml2 },
135  { &IID_IVBSAXXMLReader, LibXml2 },
136  { &IID_IMXAttributes, LibXml2 },
137  { &IID_IMXReaderControl, LibXml2 },
138  { &IID_IMXWriter, LibXml2 },
139  { &IID_IVBMXNamespaceManager, LibXml2 },
140  { &IID_IServerXMLHTTPRequest, LibXml2 }
141 };
142 
144 {
145  return tid_ids[tid].iid;
146 }
147 
148 static inline unsigned get_libid_from_tid(tid_t tid)
149 {
150  return tid_ids[tid].lib;
151 }
152 
153 static HRESULT get_typelib(unsigned lib, ITypeLib **tl)
154 {
155  HRESULT hres;
156 
157  if(!typelib[lib]) {
158  hres = LoadRegTypeLib(lib_ids[lib].iid, lib_ids[lib].major, 0, LOCALE_SYSTEM_DEFAULT, tl);
159  if(FAILED(hres)) {
160  ERR("LoadRegTypeLib failed: %08x\n", hres);
161  return hres;
162  }
163 
164  if (InterlockedCompareExchangePointer((void**)&typelib[lib], *tl, NULL))
165  ITypeLib_Release(*tl);
166  }
167 
168  *tl = typelib[lib];
169  return S_OK;
170 }
171 
173 {
174  unsigned lib = get_libid_from_tid(tid);
175  ITypeLib *typelib;
176  HRESULT hres;
177 
178  if (FAILED(hres = get_typelib(lib, &typelib)))
179  return hres;
180 
181  if(!typeinfos[tid]) {
182  ITypeInfo *ti;
183 
184  hres = ITypeLib_GetTypeInfoOfGuid(typelib, get_riid_from_tid(tid), &ti);
185  if(FAILED(hres)) {
186  /* try harder with typelib from msxml.dll */
188  return hres;
189  hres = ITypeLib_GetTypeInfoOfGuid(typelib, get_riid_from_tid(tid), &ti);
190  if(FAILED(hres)) {
191  ERR("GetTypeInfoOfGuid failed: %08x\n", hres);
192  return hres;
193  }
194  }
195 
197  ITypeInfo_Release(ti);
198  }
199 
200  *typeinfo = typeinfos[tid];
201 
202  ITypeInfo_AddRef(typeinfos[tid]);
203  return S_OK;
204 }
205 
206 void release_typelib(void)
207 {
208  dispex_data_t *iter;
209  unsigned i;
210 
211  while(!list_empty(&dispex_data_list)) {
213  list_remove(&iter->entry);
214 
215  for(i=0; i < iter->func_cnt; i++)
216  SysFreeString(iter->funcs[i].name);
217 
218  heap_free(iter->funcs);
219  heap_free(iter->name_table);
220  heap_free(iter);
221  }
222 
223  for(i=0; i < ARRAY_SIZE(typeinfos); i++)
224  if(typeinfos[i])
225  ITypeInfo_Release(typeinfos[i]);
226 
227  for(i=0; i < ARRAY_SIZE(typelib); i++)
228  if(typelib[i])
229  ITypeLib_Release(typelib[i]);
230 
232 }
233 
235 {
236  HRESULT hres;
237 
238  if(data->func_cnt && data->funcs[data->func_cnt-1].id == id)
239  return;
240 
241  if(data->func_cnt == *size)
242  data->funcs = heap_realloc(data->funcs, (*size <<= 1)*sizeof(func_info_t));
243 
244  hres = ITypeInfo_GetDocumentation(dti, id, &data->funcs[data->func_cnt].name, NULL, NULL, NULL);
245  if(FAILED(hres))
246  return;
247 
248  data->funcs[data->func_cnt].id = id;
249  data->funcs[data->func_cnt].tid = tid;
250 
251  data->func_cnt++;
252 }
253 
254 static int dispid_cmp(const void *p1, const void *p2)
255 {
256  return ((const func_info_t*)p1)->id - ((const func_info_t*)p2)->id;
257 }
258 
259 static int func_name_cmp(const void *p1, const void *p2)
260 {
261  return strcmpiW((*(func_info_t* const*)p1)->name, (*(func_info_t* const*)p2)->name);
262 }
263 
265 {
266  const tid_t *tid = This->data->iface_tids;
267  FUNCDESC *funcdesc;
269  DWORD size = 16, i;
270  ITypeInfo *ti, *dti;
271  HRESULT hres;
272 
273  TRACE("(%p)\n", This);
274 
275  hres = get_typeinfo(This->data->disp_tid, &dti);
276  if(FAILED(hres)) {
277  ERR("Could not get disp type info: %08x\n", hres);
278  return NULL;
279  }
280 
281  data = heap_alloc(sizeof(dispex_data_t));
282  data->func_cnt = 0;
283  data->funcs = heap_alloc(size*sizeof(func_info_t));
285 
286  while(*tid) {
287  hres = get_typeinfo(*tid, &ti);
288  if(FAILED(hres))
289  break;
290 
291  i=0;
292  while(1) {
293  hres = ITypeInfo_GetFuncDesc(ti, i++, &funcdesc);
294  if(FAILED(hres))
295  break;
296 
297  add_func_info(data, &size, *tid, funcdesc->memid, dti);
298  ITypeInfo_ReleaseFuncDesc(ti, funcdesc);
299  }
300 
301  ITypeInfo_Release(ti);
302  tid++;
303  }
304 
305  if(!data->func_cnt) {
306  heap_free(data->funcs);
307  data->funcs = NULL;
308  }else if(data->func_cnt != size) {
309  data->funcs = heap_realloc(data->funcs, data->func_cnt * sizeof(func_info_t));
310  }
311 
312  qsort(data->funcs, data->func_cnt, sizeof(func_info_t), dispid_cmp);
313 
314  if(data->funcs) {
315  data->name_table = heap_alloc(data->func_cnt * sizeof(func_info_t*));
316  for(i=0; i < data->func_cnt; i++)
317  data->name_table[i] = data->funcs+i;
318  qsort(data->name_table, data->func_cnt, sizeof(func_info_t*), func_name_cmp);
319  }else {
320  data->name_table = NULL;
321  }
322 
323  ITypeInfo_Release(dti);
324  return data;
325 }
326 
328 {
329  if(This->data->data)
330  return This->data->data;
331 
333 
334  if(!This->data->data)
335  This->data->data = preprocess_dispex_data(This);
336 
338 
339  return This->data->data;
340 }
341 
342 static inline DispatchEx *impl_from_IDispatchEx(IDispatchEx *iface)
343 {
344  return CONTAINING_RECORD(iface, DispatchEx, IDispatchEx_iface);
345 }
346 
347 static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
348 {
350 
351  return IUnknown_QueryInterface(This->outer, riid, ppv);
352 }
353 
354 static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
355 {
357 
358  return IUnknown_AddRef(This->outer);
359 }
360 
361 static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
362 {
364 
365  return IUnknown_Release(This->outer);
366 }
367 
368 static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
369 {
371 
372  TRACE("(%p)->(%p)\n", This, pctinfo);
373 
374  *pctinfo = 1;
375  return S_OK;
376 }
377 
378 static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo,
379  LCID lcid, ITypeInfo **ppTInfo)
380 {
382 
383  TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
384 
385  return get_typeinfo(This->data->disp_tid, ppTInfo);
386 }
387 
388 static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid,
389  LPOLESTR *rgszNames, UINT cNames,
390  LCID lcid, DISPID *rgDispId)
391 {
393  UINT i;
394  HRESULT hres;
395 
396  TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
397  lcid, rgDispId);
398 
399  for(i=0; i < cNames; i++) {
400  hres = IDispatchEx_GetDispID(&This->IDispatchEx_iface, rgszNames[i], 0, rgDispId+i);
401  if(FAILED(hres))
402  return hres;
403  }
404 
405  return S_OK;
406 }
407 
408 static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
409  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
410  VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
411 {
413 
414  TRACE("(%p)->(%x %s %x %x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
415  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
416 
417  return IDispatchEx_InvokeEx(&This->IDispatchEx_iface, dispIdMember, lcid, wFlags,
418  pDispParams, pVarResult, pExcepInfo, NULL);
419 }
420 
421 static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
422 {
425  int min, max, n, c;
426 
427  TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid);
428 
429  if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit))
430  FIXME("Unsupported grfdex %x\n", grfdex);
431 
433  if(!data)
434  return E_FAIL;
435 
436  min = 0;
437  max = data->func_cnt-1;
438 
439  while(min <= max) {
440  n = (min+max)/2;
441 
442  c = strcmpiW(data->name_table[n]->name, bstrName);
443  if(!c) {
444  if((grfdex & fdexNameCaseSensitive) && strcmpW(data->name_table[n]->name, bstrName))
445  break;
446 
447  *pid = data->name_table[n]->id;
448  return S_OK;
449  }
450 
451  if(c > 0)
452  max = n-1;
453  else
454  min = n+1;
455  }
456 
457  if(This->data->vtbl && This->data->vtbl->get_dispid) {
458  HRESULT hres;
459 
460  hres = This->data->vtbl->get_dispid(This->outer, bstrName, grfdex, pid);
461  if(hres != DISP_E_UNKNOWNNAME)
462  return hres;
463  }
464 
465  TRACE("not found %s\n", debugstr_w(bstrName));
466  return DISP_E_UNKNOWNNAME;
467 }
468 
470 {
471  switch (id)
472  {
487  return TRUE;
488  default:
489  return FALSE;
490  }
491 }
492 
493 static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp,
494  VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
495 {
497  IUnknown *unk;
498  ITypeInfo *ti;
500  UINT argerr=0;
501  int min, max, n;
502  HRESULT hres;
503 
504  TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
505 
506  if(This->data->vtbl && This->data->vtbl->invoke) {
507  hres = This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei);
508  if (hres != DISP_E_UNKNOWNNAME) return hres;
509  }
510 
511  if(wFlags == DISPATCH_CONSTRUCT) {
512  FIXME("DISPATCH_CONSTRUCT not implemented\n");
513  return E_NOTIMPL;
514  }
515 
517  if(!data)
518  return E_FAIL;
519 
520  min = 0;
521  max = data->func_cnt-1;
522 
523  while(min <= max) {
524  n = (min+max)/2;
525 
526  if(data->funcs[n].id == id)
527  break;
528 
529  if(data->funcs[n].id < id)
530  min = n+1;
531  else
532  max = n-1;
533  }
534 
535  if(min > max) {
536  WARN("invalid id %x\n", id);
537  return DISP_E_UNKNOWNNAME;
538  }
539 
540  hres = get_typeinfo(data->funcs[n].tid, &ti);
541  if(FAILED(hres)) {
542  ERR("Could not get type info: %08x\n", hres);
543  return hres;
544  }
545 
546  hres = IUnknown_QueryInterface(This->outer, get_riid_from_tid(data->funcs[n].tid), (void**)&unk);
547  if(FAILED(hres)) {
548  ERR("Could not get iface: %08x\n", hres);
549  ITypeInfo_Release(ti);
550  return E_FAIL;
551  }
552 
555  hres = ITypeInfo_Invoke(ti, unk, id, wFlags, pdp, pvarRes, pei, &argerr);
556 
557  ITypeInfo_Release(ti);
558  IUnknown_Release(unk);
559  return hres;
560 }
561 
562 static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
563 {
565  TRACE("Not implemented in native msxml3 (%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex);
566  return E_NOTIMPL;
567 }
568 
569 static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
570 {
572  TRACE("Not implemented in native msxml3 (%p)->(%x)\n", This, id);
573  return E_NOTIMPL;
574 }
575 
576 static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
577 {
579  TRACE("Not implemented in native msxml3 (%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex);
580  return E_NOTIMPL;
581 }
582 
583 static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
584 {
586  TRACE("Not implemented in native msxml3 (%p)->(%x %p)\n", This, id, pbstrName);
587  return E_NOTIMPL;
588 }
589 
590 static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
591 {
593  TRACE(" Not implemented in native msxml3 (%p)->(%x %x %p)\n", This, grfdex, id, pid);
594  return E_NOTIMPL;
595 }
596 
597 static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
598 {
600  TRACE("Not implemented in native msxml3 (%p)->(%p)\n", This, ppunk);
601  return E_NOTIMPL;
602 }
603 
604 static IDispatchExVtbl DispatchExVtbl = {
620 };
621 
623 {
624  static const IID IID_UndocumentedScriptIface =
625  {0x719c3050,0xf9d3,0x11cf,{0xa4,0x93,0x00,0x40,0x05,0x23,0xa8,0xa0}};
626  static const IID IID_IDispatchJS =
627  {0x719c3050,0xf9d3,0x11cf,{0xa4,0x93,0x00,0x40,0x05,0x23,0xa8,0xa6}};
628 
630  TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
631  *ppv = &This->IDispatchEx_iface;
632  }else if(IsEqualGUID(&IID_IDispatchEx, riid)) {
633  TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv);
634  *ppv = &This->IDispatchEx_iface;
635  }else if(IsEqualGUID(&IID_IDispatchJS, riid)) {
636  TRACE("(%p)->(IID_IDispatchJS %p) returning NULL\n", This, ppv);
637  *ppv = NULL;
638  }else if(IsEqualGUID(&IID_UndocumentedScriptIface, riid)) {
639  TRACE("(%p)->(IID_UndocumentedScriptIface %p) returning NULL\n", This, ppv);
640  *ppv = NULL;
641  }else if (IsEqualGUID(&IID_IObjectIdentity, riid)) {
642  TRACE("IID_IObjectIdentity not supported returning NULL\n");
643  *ppv = NULL;
644  }else {
645  return FALSE;
646  }
647 
648  if(*ppv)
649  IUnknown_AddRef((IUnknown*)*ppv);
650  return TRUE;
651 }
652 
654 {
655  dispex->IDispatchEx_iface.lpVtbl = &DispatchExVtbl;
656  dispex->outer = outer;
657  dispex->data = data;
658 }
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515
static CRITICAL_SECTION cs_dispex_static_data
Definition: dispex.c:48
#define DISPID_DOM_DOCUMENT_DOCUMENTELEMENT
Definition: msxml2did.h:114
static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: dispex.c:493
Definition: dispex.c:60
static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
Definition: dispex.c:421
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
#define DISPID_MXXML_FILTER_CONTENTHANDLER
Definition: msxml2did.h:478
#define max(a, b)
Definition: svc.c:63
#define REFIID
Definition: guiddef.h:118
void release_typelib(void)
Definition: dispex.c:144
static int func_name_cmp(const void *p1, const void *p2)
Definition: dispex.c:259
#define DWORD_PTR
Definition: treelist.c:76
func_info_t ** name_table
Definition: dispex.c:51
#define TRUE
Definition: types.h:120
static dispex_data_t * preprocess_dispex_data(DispatchEx *This)
Definition: dispex.c:264
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
Definition: dispex.c:576
static tid_id_t tid_ids[]
Definition: dispex.c:99
tid_t
Definition: ieframe.h:311
WINE_DEFAULT_DEBUG_CHANNEL(jscript)
#define WARN(fmt,...)
Definition: debug.h:112
static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: dispex.c:378
REFIID iid
Definition: dispex.c:71
REFIID LPVOID * ppv
Definition: atlbase.h:39
GLdouble n
Definition: glext.h:7729
#define DISPID_XMLDOM_SELECTION_CONTEXT
Definition: msxml2did.h:302
static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
Definition: dispex.c:354
DWORD LCID
Definition: nls.h:13
OLECHAR * BSTR
Definition: compat.h:2041
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static HRESULT get_typelib(unsigned lib, ITypeLib **tl)
Definition: dispex.c:153
static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
Definition: dispex.c:583
static LPOLESTR
Definition: stg_prop.c:27
static void add_func_info(dispex_data_t *data, DWORD *size, tid_t tid, DISPID id, ITypeInfo *dti)
Definition: dispex.c:234
#define E_FAIL
Definition: ddrawi.h:102
#define DISPID_MXXML_FILTER_DTDHANDLER
Definition: msxml2did.h:479
static CRITICAL_SECTION_DEBUG cs_dispex_static_data_dbg
Definition: dispex.c:49
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static ITypeLib * typelib[LibXml_Last]
Definition: dispex.c:90
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define DISPID_SAX_CONTENTHANDLER_DOCUMENTLOCATOR
Definition: msxml2did.h:381
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
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
Definition: dispex.c:597
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
lib_version_t
Definition: dispex.c:58
static ITypeInfo * typeinfos[LAST_tid]
Definition: dispex.c:91
#define debugstr_w
Definition: kernel32.h:32
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
#define FIXME(fmt,...)
Definition: debug.h:111
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define DISPID_XMLDOM_TEMPLATE_STYLESHEET
Definition: msxml2did.h:313
smooth NULL
Definition: ftsmooth.c:416
DWORD func_cnt
Definition: dispex.c:49
#define DISPID_SAX_XMLREADER_ENTITYRESOLVER
Definition: msxml2did.h:346
#define DISPID_MXXML_FILTER_ENTITYRESOLVER
Definition: msxml2did.h:480
IDispatchEx IDispatchEx_iface
#define debugstr_guid
Definition: kernel32.h:35
static DispatchEx * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: dispex.c:342
#define DISPATCH_PROPERTYPUT
Definition: oleauto.h:1008
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
Definition: dispex.c:368
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
Definition: dispex.c:569
#define LIST_INIT(head)
Definition: queue.h:197
dispex_static_data_t * data
static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: dispex.c:408
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
LONG HRESULT
Definition: typedefs.h:79
#define DISPID_SAX_XMLREADER_CONTENTHANDLER
Definition: msxml2did.h:347
unsigned short major
Definition: dispex.c:72
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
Definition: dispex.c:562
#define WINAPI
Definition: msvc.h:6
const GLubyte * c
Definition: glext.h:8905
static IDispatchExVtbl DispatchExVtbl
Definition: dispex.c:604
#define LOCALE_SYSTEM_DEFAULT
unsigned short WORD
Definition: ntddk_ex.h:93
#define DISPID_XMLDOM_DOCUMENT2_SCHEMAS
Definition: msxml2did.h:280
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID iid
Definition: dispex.c:66
BSTR name
Definition: dispex.c:37
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
Definition: dispex.c:347
static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
Definition: dispex.c:361
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
func_info_t * funcs
Definition: dispex.c:50
const GUID IID_IDispatch
enum lib_version_t lib
Definition: dispex.c:67
#define IID_NULL
Definition: guiddef.h:98
uint32_t entry
Definition: isohybrid.c:63
Definition: _list.h:228
LIST_ENTRY ProcessLocksList
Definition: winbase.h:861
static dispex_data_t * get_dispex_data(DispatchEx *This)
Definition: dispex.c:327
#define DISPATCH_PROPERTYPUTREF
Definition: oleauto.h:1009
#define strcmpiW(s1, s2)
Definition: unicode.h:39
HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo)
Definition: dispex.c:172
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534
#define ERR(fmt,...)
Definition: debug.h:110
struct stdole::EXCEPINFO EXCEPINFO
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: dispex.c:388
#define S_OK
Definition: intsafe.h:51
static VARIANTARG static DISPID
Definition: ordinal.c:49
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
static unsigned get_libid_from_tid(tid_t tid)
Definition: dispex.c:148
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
#define ARRAY_SIZE(a)
Definition: main.h:24
#define major(rdev)
Definition: propsheet.cpp:916
const IID * get_riid_from_tid(tid_t tid)
Definition: dispex.c:143
struct list entry
Definition: dispex.c:54
#define E_NOTIMPL
Definition: ddrawi.h:99
#define min(a, b)
Definition: monoChain.cc:55
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static int dispid_cmp(const void *p1, const void *p2)
Definition: dispex.c:254
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
Definition: name.c:38
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
struct stdole::DISPPARAMS DISPPARAMS
#define c
Definition: ke_i.h:80
unsigned int ULONG
Definition: retypes.h:1
GLenum GLuint id
Definition: glext.h:5579
IUnknown * outer
Definition: dispex.c:61
static struct list dispex_data_list
Definition: dispex.c:89
#define DISPID_SAX_XMLREADER_DTDHANDLER
Definition: msxml2did.h:348
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define LIST_ENTRY(type)
Definition: queue.h:175
#define DISPID_SAX_XMLFILTER_PARENT
Definition: msxml2did.h:369
static BOOL is_propputref_id(DISPID id)
Definition: dispex.c:469
static TfClientId tid
#define DISPID_MXXML_FILTER_ERRORHANDLER
Definition: msxml2did.h:481
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
Definition: dispex.c:590
#define DISPID_SAX_XMLREADER_ERRORHANDLER
Definition: msxml2did.h:349
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static lib_id_t lib_ids[]
Definition: dispex.c:94
GLuint const GLchar * name
Definition: glext.h:6031