ReactOS 0.4.15-dev-7842-g558ab78
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{
53 0, 0, { (DWORD_PTR)(__FILE__ ": dispex_static_data") }
54};
56
57
59{
60 LibXml = 0,
63};
64
65typedef struct {
68} tid_id_t;
69
70typedef struct {
72 unsigned short major;
73} lib_id_t;
74
75typedef struct {
76 DISPID id;
77 BSTR name;
78 enum tid_t tid;
80
81struct dispex_data_t {
85
86 struct list entry;
87};
88
92
93/* indexed with lib_version_t values */
94static lib_id_t lib_ids[] = {
95 { &LIBID_MSXML, 2 },
96 { &LIBID_MSXML2, 3 }
97};
98
99static 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
148static inline unsigned get_libid_from_tid(tid_t tid)
149{
150 return tid_ids[tid].lib;
151}
152
153static HRESULT get_typelib(unsigned lib, ITypeLib **tl)
154{
156
157 if(!typelib[lib]) {
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);
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
201
202 ITypeInfo_AddRef(typeinfos[tid]);
203 return S_OK;
204}
205
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{
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
254static 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
259static 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;
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
343{
344 return CONTAINING_RECORD(iface, DispatchEx, IDispatchEx_iface);
345}
346
348{
350
351 return IUnknown_QueryInterface(This->outer, riid, ppv);
352}
353
355{
357
358 return IUnknown_AddRef(This->outer);
359}
360
362{
364
365 return IUnknown_Release(This->outer);
366}
367
369{
371
372 TRACE("(%p)->(%p)\n", This, pctinfo);
373
374 *pctinfo = 1;
375 return S_OK;
376}
377
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
389 LPOLESTR *rgszNames, UINT cNames,
390 LCID lcid, DISPID *rgDispId)
391{
393 UINT i;
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
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
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) {
459
460 hres = This->data->vtbl->get_dispid(This->outer, bstrName, grfdex, pid);
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
493static 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;
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
563{
565 TRACE("Not implemented in native msxml3 (%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex);
566 return E_NOTIMPL;
567}
568
570{
572 TRACE("Not implemented in native msxml3 (%p)->(%x)\n", This, id);
573 return E_NOTIMPL;
574}
575
577{
579 TRACE("Not implemented in native msxml3 (%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex);
580 return E_NOTIMPL;
581}
582
584{
586 TRACE("Not implemented in native msxml3 (%p)->(%x %p)\n", This, id, pbstrName);
587 return E_NOTIMPL;
588}
589
591{
593 TRACE(" Not implemented in native msxml3 (%p)->(%x %x %p)\n", This, grfdex, id, pid);
594 return E_NOTIMPL;
595}
596
598{
600 TRACE("Not implemented in native msxml3 (%p)->(%p)\n", This, ppunk);
601 return E_NOTIMPL;
602}
603
604static 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}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:71
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:33
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static int list_empty(struct list_entry *head)
Definition: list.h:58
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
#define FIXME(fmt,...)
Definition: debug.h:111
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
Definition: list.h:37
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
OLECHAR * BSTR
Definition: compat.h:2293
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLdouble n
Definition: glext.h:7729
const GLubyte * c
Definition: glext.h:8905
GLuint id
Definition: glext.h:5910
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
tid_t
Definition: ieframe.h:311
@ LAST_tid
Definition: ieframe.h:317
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
uint32_t entry
Definition: isohybrid.c:63
static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: dispex.c:703
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
Definition: dispex.c:845
static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
Definition: dispex.c:628
static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: dispex.c:656
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
Definition: dispex.c:828
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
Definition: dispex.c:883
static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
Definition: dispex.c:689
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:676
static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
Definition: dispex.c:852
static jsdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: dispex.c:593
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
Definition: dispex.c:870
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
Definition: dispex.c:598
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
Definition: dispex.c:621
static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: dispex.c:648
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
Definition: dispex.c:805
static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
Definition: dispex.c:638
static IDispatchExVtbl DispatchExVtbl
Definition: dispex.c:890
#define c
Definition: ke_i.h:80
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
HRESULT hres
Definition: protocol.c:465
static TfClientId tid
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
#define min(a, b)
Definition: monoChain.cc:55
static dispex_data_t * preprocess_dispex_data(DispatchEx *This)
Definition: dispex.c:313
static struct list dispex_data_list
Definition: dispex.c:92
static int func_name_cmp(const void *p1, const void *p2)
Definition: dispex.c:308
static CRITICAL_SECTION cs_dispex_static_data
Definition: dispex.c:23
static void add_func_info(dispex_data_t *data, DWORD *size, tid_t tid, const FUNCDESC *desc, ITypeInfo *dti)
Definition: dispex.c:213
static ITypeLib * typelib
Definition: dispex.c:90
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
static int dispid_cmp(const void *p1, const void *p2)
Definition: dispex.c:303
static CRITICAL_SECTION_DEBUG cs_dispex_static_data_dbg
Definition: dispex.c:24
void release_typelib(void)
Definition: dispex.c:144
static REFIID tid_ids[]
Definition: dispex.c:94
static HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
Definition: dispex.c:118
static dispex_data_t * get_dispex_data(DispatchEx *This)
Definition: dispex.c:439
static ITypeInfo * typeinfos[LAST_tid]
Definition: dispex.c:91
#define DISPID_DOM_DOCUMENT_DOCUMENTELEMENT
Definition: msxml2did.h:114
#define DISPID_XMLDOM_DOCUMENT2_SCHEMAS
Definition: msxml2did.h:280
#define DISPID_MXXML_FILTER_ENTITYRESOLVER
Definition: msxml2did.h:480
#define DISPID_SAX_XMLREADER_ERRORHANDLER
Definition: msxml2did.h:349
#define DISPID_MXXML_FILTER_ERRORHANDLER
Definition: msxml2did.h:481
#define DISPID_SAX_XMLFILTER_PARENT
Definition: msxml2did.h:369
#define DISPID_SAX_XMLREADER_ENTITYRESOLVER
Definition: msxml2did.h:346
#define DISPID_XMLDOM_TEMPLATE_STYLESHEET
Definition: msxml2did.h:313
#define DISPID_XMLDOM_SELECTION_CONTEXT
Definition: msxml2did.h:302
#define DISPID_SAX_CONTENTHANDLER_DOCUMENTLOCATOR
Definition: msxml2did.h:381
#define DISPID_SAX_XMLREADER_DTDHANDLER
Definition: msxml2did.h:348
#define DISPID_MXXML_FILTER_DTDHANDLER
Definition: msxml2did.h:479
#define DISPID_MXXML_FILTER_CONTENTHANDLER
Definition: msxml2did.h:478
#define DISPID_SAX_XMLREADER_CONTENTHANDLER
Definition: msxml2did.h:347
static HRESULT get_typelib(unsigned lib, ITypeLib **tl)
Definition: dispex.c:153
const IID * get_riid_from_tid(tid_t tid)
Definition: dispex.c:143
static lib_id_t lib_ids[]
Definition: dispex.c:94
static unsigned get_libid_from_tid(tid_t tid)
Definition: dispex.c:148
lib_version_t
Definition: dispex.c:59
@ LibXml2
Definition: dispex.c:61
@ LibXml
Definition: dispex.c:60
@ LibXml_Last
Definition: dispex.c:62
static BOOL is_propputref_id(DISPID id)
Definition: dispex.c:469
unsigned int UINT
Definition: ndis.h:50
#define LOCALE_SYSTEM_DEFAULT
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define DISPATCH_PROPERTYPUT
Definition: oleauto.h:1008
#define DISPATCH_PROPERTYPUTREF
Definition: oleauto.h:1009
const GUID IID_IDispatch
#define major(rdev)
Definition: propsheet.cpp:928
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define IID_NULL
Definition: guiddef.h:98
#define strcmpW(s1, s2)
Definition: unicode.h:38
#define strcmpiW(s1, s2)
Definition: unicode.h:39
DWORD LCID
Definition: nls.h:13
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 TRACE(s)
Definition: solgame.cpp:4
dispex_static_data_t * data
IDispatchEx IDispatchEx_iface
IUnknown * outer
LIST_ENTRY ProcessLocksList
Definition: winbase.h:883
func_info_t * funcs
Definition: dispex.c:50
DWORD func_cnt
Definition: dispex.c:49
func_info_t ** name_table
Definition: dispex.c:51
struct list entry
Definition: dispex.c:54
enum tid_t tid
Definition: dispex.c:78
BSTR name
Definition: dispex.c:37
unsigned short major
Definition: dispex.c:72
REFIID iid
Definition: dispex.c:71
Definition: list.h:15
Definition: name.c:39
REFIID iid
Definition: dispex.c:66
enum lib_version_t lib
Definition: dispex.c:67
#define max(a, b)
Definition: svc.c:63
#define LIST_INIT(head)
Definition: queue.h:197
#define LIST_ENTRY(type)
Definition: queue.h:175
#define DWORD_PTR
Definition: treelist.c:76
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
#define WINAPI
Definition: msvc.h:6
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515