ReactOS 0.4.16-dev-2206-gc56950d
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 <stdarg.h>
22
23#ifdef __REACTOS__
24#include <ole2.h>
25#endif
26#include "msxml2.h"
27#include "msxml2did.h"
28#include "dispex.h"
29
30#include "wine/debug.h"
31
32#include "msxml_dispex.h"
33
35
38{
41 0, 0, { (DWORD_PTR)(__FILE__ ": dispex_static_data") }
42};
44
46{
47 LibXml = 0,
50};
51
52typedef struct {
55} tid_id_t;
56
57typedef struct {
59 unsigned short major;
60} lib_id_t;
61
62typedef struct {
63 DISPID id;
64 BSTR name;
65 enum tid_t tid;
67
68struct dispex_data_t {
72
73 struct list entry;
74};
75
79
80/* indexed with lib_version_t values */
81static lib_id_t lib_ids[] = {
82 { &LIBID_MSXML, 2 },
83 { &LIBID_MSXML2, 3 }
84};
85
86static tid_id_t tid_ids[] = {
87 { &IID_NULL, LibXml2 },
88 { &IID_IXMLDOMAttribute, LibXml2 },
89 { &IID_IXMLDOMCDATASection, LibXml2 },
90 { &IID_IXMLDOMComment, LibXml2 },
91 { &IID_IXMLDOMDocument, LibXml2 },
92 { &IID_IXMLDOMDocument2, LibXml2 },
93 { &IID_IXMLDOMDocument3, LibXml2 },
94 { &IID_IXMLDOMDocumentFragment, LibXml2 },
95 { &IID_IXMLDOMDocumentType, LibXml2 },
96 { &IID_IXMLDOMElement, LibXml2 },
97 { &IID_IXMLDOMEntityReference, LibXml2 },
98 { &IID_IXMLDOMImplementation, LibXml2 },
99 { &IID_IXMLDOMNamedNodeMap, LibXml2 },
100 { &IID_IXMLDOMNode, LibXml2 },
101 { &IID_IXMLDOMNodeList, LibXml2 },
102 { &IID_IXMLDOMParseError2, LibXml2 },
103 { &IID_IXMLDOMProcessingInstruction, LibXml2 },
104 { &IID_IXMLDOMSchemaCollection, LibXml2 },
105 { &IID_IXMLDOMSchemaCollection2, LibXml2 },
106 { &IID_IXMLDOMSelection, LibXml2 },
107 { &IID_IXMLDOMText, LibXml2 },
108 { &IID_IXMLElement, LibXml },
109 { &IID_IXMLDocument, LibXml },
110 { &IID_IXMLHTTPRequest, LibXml2 },
111 { &IID_IXSLProcessor, LibXml2 },
112 { &IID_IXSLTemplate, LibXml2 },
113 { &IID_IVBSAXAttributes, LibXml2 },
114 { &IID_IVBSAXContentHandler, LibXml2 },
115 { &IID_IVBSAXDeclHandler, LibXml2 },
116 { &IID_IVBSAXDTDHandler, LibXml2 },
117 { &IID_IVBSAXEntityResolver, LibXml2 },
118 { &IID_IVBSAXErrorHandler, LibXml2 },
119 { &IID_IVBSAXLexicalHandler, LibXml2 },
120 { &IID_IVBSAXLocator, LibXml2 },
121 { &IID_IVBSAXXMLFilter, LibXml2 },
122 { &IID_IVBSAXXMLReader, LibXml2 },
123 { &IID_IMXAttributes, LibXml2 },
124 { &IID_IMXReaderControl, LibXml2 },
125 { &IID_IMXWriter, LibXml2 },
126 { &IID_IVBMXNamespaceManager, LibXml2 },
127 { &IID_IServerXMLHTTPRequest, LibXml2 }
128};
129
131{
132 return tid_ids[tid].iid;
133}
134
135static inline unsigned get_libid_from_tid(tid_t tid)
136{
137 return tid_ids[tid].lib;
138}
139
140static HRESULT get_typelib(unsigned lib, ITypeLib **tl)
141{
143
144 if(!typelib[lib]) {
146 if(FAILED(hres)) {
147 ERR("LoadRegTypeLib failed, hr %#lx.\n", hres);
148 return hres;
149 }
150
151 if (InterlockedCompareExchangePointer((void**)&typelib[lib], *tl, NULL))
152 ITypeLib_Release(*tl);
153 }
154
155 *tl = typelib[lib];
156 return S_OK;
157}
158
160{
161 unsigned lib = get_libid_from_tid(tid);
164
165 if (FAILED(hres = get_typelib(lib, &typelib)))
166 return hres;
167
168 if(!typeinfos[tid]) {
169 ITypeInfo *ti;
170
171 hres = ITypeLib_GetTypeInfoOfGuid(typelib, get_riid_from_tid(tid), &ti);
172 if(FAILED(hres)) {
173 /* try harder with typelib from msxml.dll */
175 return hres;
176 hres = ITypeLib_GetTypeInfoOfGuid(typelib, get_riid_from_tid(tid), &ti);
177 if(FAILED(hres)) {
178 ERR("GetTypeInfoOfGuid failed, hr %#lx.\n", hres);
179 return hres;
180 }
181 }
182
184 ITypeInfo_Release(ti);
185 }
186
188
189 ITypeInfo_AddRef(typeinfos[tid]);
190 return S_OK;
191}
192
194{
195 dispex_data_t *iter;
196 unsigned i;
197
198 while(!list_empty(&dispex_data_list)) {
200 list_remove(&iter->entry);
201
202 for(i=0; i < iter->func_cnt; i++)
203 SysFreeString(iter->funcs[i].name);
204
205 free(iter->funcs);
206 free(iter->name_table);
207 free(iter);
208 }
209
210 for(i=0; i < ARRAY_SIZE(typeinfos); i++)
211 if(typeinfos[i])
212 ITypeInfo_Release(typeinfos[i]);
213
214 for(i=0; i < ARRAY_SIZE(typelib); i++)
215 if(typelib[i])
216 ITypeLib_Release(typelib[i]);
217
219}
220
222{
224
225 if(data->func_cnt && data->funcs[data->func_cnt-1].id == id)
226 return;
227
228 if(data->func_cnt == *size)
229 data->funcs = realloc(data->funcs, (*size <<= 1) * sizeof(func_info_t));
230
231 hres = ITypeInfo_GetDocumentation(dti, id, &data->funcs[data->func_cnt].name, NULL, NULL, NULL);
232 if(FAILED(hres))
233 return;
234
235 data->funcs[data->func_cnt].id = id;
236 data->funcs[data->func_cnt].tid = tid;
237
238 data->func_cnt++;
239}
240
241static int __cdecl dispid_cmp(const void *p1, const void *p2)
242{
243 return ((const func_info_t*)p1)->id - ((const func_info_t*)p2)->id;
244}
245
246static int __cdecl func_name_cmp(const void *p1, const void *p2)
247{
248 return lstrcmpiW((*(func_info_t* const*)p1)->name, (*(func_info_t* const*)p2)->name);
249}
250
252{
253 const tid_t *tid = This->data->iface_tids;
254 FUNCDESC *funcdesc;
256 DWORD size = 16, i;
257 ITypeInfo *ti, *dti;
259
260 TRACE("(%p)\n", This);
261
262 hres = get_typeinfo(This->data->disp_tid, &dti);
263 if(FAILED(hres)) {
264 ERR("Could not get disp type info, hr %#lx.\n", hres);
265 return NULL;
266 }
267
268 data = malloc(sizeof(dispex_data_t));
269 data->func_cnt = 0;
270 data->funcs = malloc(size * sizeof(func_info_t));
272
273 while(*tid) {
274 hres = get_typeinfo(*tid, &ti);
275 if(FAILED(hres))
276 break;
277
278 i=0;
279 while(1) {
280 hres = ITypeInfo_GetFuncDesc(ti, i++, &funcdesc);
281 if(FAILED(hres))
282 break;
283
284 add_func_info(data, &size, *tid, funcdesc->memid, dti);
285 ITypeInfo_ReleaseFuncDesc(ti, funcdesc);
286 }
287
288 ITypeInfo_Release(ti);
289 tid++;
290 }
291
292 if(!data->func_cnt) {
293 free(data->funcs);
294 data->funcs = NULL;
295 }else if(data->func_cnt != size) {
296 data->funcs = realloc(data->funcs, data->func_cnt * sizeof(func_info_t));
297 }
298
299 if(data->funcs) {
300 qsort(data->funcs, data->func_cnt, sizeof(func_info_t), dispid_cmp);
301
302 data->name_table = malloc(data->func_cnt * sizeof(func_info_t*));
303 for(i=0; i < data->func_cnt; i++)
304 data->name_table[i] = data->funcs+i;
305 qsort(data->name_table, data->func_cnt, sizeof(func_info_t*), func_name_cmp);
306 }else {
307 data->name_table = NULL;
308 }
309
310 ITypeInfo_Release(dti);
311 return data;
312}
313
315{
316 if(This->data->data)
317 return This->data->data;
318
320
321 if(!This->data->data)
322 This->data->data = preprocess_dispex_data(This);
323
325
326 return This->data->data;
327}
328
330{
331 return CONTAINING_RECORD(iface, DispatchEx, IDispatchEx_iface);
332}
333
335{
337
338 return IUnknown_QueryInterface(This->outer, riid, ppv);
339}
340
342{
344
345 return IUnknown_AddRef(This->outer);
346}
347
349{
351
352 return IUnknown_Release(This->outer);
353}
354
356{
358
359 TRACE("(%p)->(%p)\n", This, pctinfo);
360
361 *pctinfo = 1;
362 return S_OK;
363}
364
366 LCID lcid, ITypeInfo **ppTInfo)
367{
368 DispatchEx *dispex = impl_from_IDispatchEx(iface);
369
370 TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
371
372 return get_typeinfo(dispex->data->disp_tid, ppTInfo);
373}
374
376 LPOLESTR *rgszNames, UINT cNames,
377 LCID lcid, DISPID *rgDispId)
378{
379 UINT i;
381
382 TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames,
383 lcid, rgDispId);
384
385 for(i=0; i < cNames; i++) {
386 hres = IDispatchEx_GetDispID(iface, rgszNames[i], 0, rgDispId+i);
387 if(FAILED(hres))
388 return hres;
389 }
390
391 return S_OK;
392}
393
395 REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
396 VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
397{
398 TRACE("%p, %ld, %s, %lx, %x, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
399 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
400
401 return IDispatchEx_InvokeEx(iface, dispIdMember, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, NULL);
402}
403
405{
408 int min, max, n, c;
409
410 TRACE("%p, %s, %lx, %p.\n", iface, debugstr_w(bstrName), grfdex, pid);
411
412 if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit))
413 FIXME("Unsupported grfdex %lx.\n", grfdex);
414
416 if(!data)
417 return E_FAIL;
418
419 min = 0;
420 max = data->func_cnt-1;
421
422 while(min <= max) {
423 n = (min+max)/2;
424
425 c = lstrcmpiW(data->name_table[n]->name, bstrName);
426 if(!c) {
427 if((grfdex & fdexNameCaseSensitive) && wcscmp(data->name_table[n]->name, bstrName))
428 break;
429
430 *pid = data->name_table[n]->id;
431 return S_OK;
432 }
433
434 if(c > 0)
435 max = n-1;
436 else
437 min = n+1;
438 }
439
440 if(This->data->vtbl && This->data->vtbl->get_dispid) {
442
443 hres = This->data->vtbl->get_dispid(This->outer, bstrName, grfdex, pid);
445 return hres;
446 }
447
448 TRACE("not found %s\n", debugstr_w(bstrName));
449 return DISP_E_UNKNOWNNAME;
450}
451
453{
454 switch (id)
455 {
470 return TRUE;
471 default:
472 return FALSE;
473 }
474}
475
477 VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
478{
480 IUnknown *unk;
481 ITypeInfo *ti;
483 UINT argerr=0;
484 int min, max, n;
486
487 TRACE("%p, %ld, %lx, %x, %p, %p, %p, %p.\n", iface, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
488
489 if(This->data->vtbl && This->data->vtbl->invoke) {
490 hres = This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei);
491 if (hres != DISP_E_UNKNOWNNAME) return hres;
492 }
493
494 if(wFlags == DISPATCH_CONSTRUCT) {
495 FIXME("DISPATCH_CONSTRUCT not implemented\n");
496 return E_NOTIMPL;
497 }
498
500 if(!data)
501 return E_FAIL;
502
503 min = 0;
504 max = data->func_cnt-1;
505
506 while(min <= max) {
507 n = (min+max)/2;
508
509 if(data->funcs[n].id == id)
510 break;
511
512 if(data->funcs[n].id < id)
513 min = n+1;
514 else
515 max = n-1;
516 }
517
518 if(min > max) {
519 WARN("invalid id %lx.\n", id);
520 return DISP_E_UNKNOWNNAME;
521 }
522
523 hres = get_typeinfo(data->funcs[n].tid, &ti);
524 if(FAILED(hres)) {
525 ERR("Could not get type info, hr %#lx.\n", hres);
526 return hres;
527 }
528
529 hres = IUnknown_QueryInterface(This->outer, get_riid_from_tid(data->funcs[n].tid), (void**)&unk);
530 if(FAILED(hres)) {
531 ERR("Could not get interface, hr %#lx.\n", hres);
532 ITypeInfo_Release(ti);
533 return E_FAIL;
534 }
535
538 hres = ITypeInfo_Invoke(ti, unk, id, wFlags, pdp, pvarRes, pei, &argerr);
539
540 ITypeInfo_Release(ti);
541 IUnknown_Release(unk);
542 return hres;
543}
544
546{
547 TRACE("%p, %s, %lx.\n", iface, debugstr_w(bstrName), grfdex);
548 return E_NOTIMPL;
549}
550
552{
553 TRACE("%p, %ld.\n", iface, id);
554 return E_NOTIMPL;
555}
556
558{
559 TRACE("%p, %ld, %lx, %p.\n", iface, id, grfdexFetch, pgrfdex);
560 return E_NOTIMPL;
561}
562
564{
565 TRACE("%p, %ld, %p.\n", iface, id, pbstrName);
566 return E_NOTIMPL;
567}
568
570{
571 TRACE("%p, %lx, %ld, %p.\n", iface, grfdex, id, pid);
572 return E_NOTIMPL;
573}
574
576{
577 TRACE("%p, %p.\n", iface, ppunk);
578 return E_NOTIMPL;
579}
580
581static IDispatchExVtbl DispatchExVtbl = {
597};
598
600{
601 static const IID IID_UndocumentedScriptIface =
602 {0x719c3050,0xf9d3,0x11cf,{0xa4,0x93,0x00,0x40,0x05,0x23,0xa8,0xa0}};
603 static const IID IID_IDispatchJS =
604 {0x719c3050,0xf9d3,0x11cf,{0xa4,0x93,0x00,0x40,0x05,0x23,0xa8,0xa6}};
605
607 TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
608 *ppv = &This->IDispatchEx_iface;
609 }else if(IsEqualGUID(&IID_IDispatchEx, riid)) {
610 TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv);
611 *ppv = &This->IDispatchEx_iface;
612 }else if(IsEqualGUID(&IID_IDispatchJS, riid)) {
613 TRACE("(%p)->(IID_IDispatchJS %p) returning NULL\n", This, ppv);
614 *ppv = NULL;
615 }else if(IsEqualGUID(&IID_UndocumentedScriptIface, riid)) {
616 TRACE("(%p)->(IID_UndocumentedScriptIface %p) returning NULL\n", This, ppv);
617 *ppv = NULL;
618 }else if (IsEqualGUID(&IID_IObjectIdentity, riid)) {
619 TRACE("IID_IObjectIdentity not supported returning NULL\n");
620 *ppv = NULL;
621 }else {
622 return FALSE;
623 }
624
625 if(*ppv)
626 IUnknown_AddRef((IUnknown*)*ppv);
627 return TRUE;
628}
629
631{
632 dispex->IDispatchEx_iface.lpVtbl = &DispatchExVtbl;
633 dispex->outer = outer;
634 dispex->data = data;
635}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
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: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
Definition: list.h:37
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define realloc
Definition: debug_ros.c:6
#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
OLECHAR * BSTR
Definition: compat.h:2293
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4265
LCID lcid
Definition: locale.c:5656
#define __cdecl
Definition: corecrt.h:121
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972
_ACRTIMP void __cdecl qsort(void *, size_t, size_t, int(__cdecl *)(const void *, const void *))
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble n
Definition: glext.h:7729
GLsizeiptr size
Definition: glext.h:5919
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
static TfClientId tid
#define InterlockedCompareExchangePointer
Definition: interlocked.h:144
#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 LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:49
#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:140
const IID * get_riid_from_tid(tid_t tid)
Definition: dispex.c:130
static lib_id_t lib_ids[]
Definition: dispex.c:81
static unsigned get_libid_from_tid(tid_t tid)
Definition: dispex.c:135
lib_version_t
Definition: dispex.c:46
@ LibXml2
Definition: dispex.c:48
@ LibXml
Definition: dispex.c:47
@ LibXml_Last
Definition: dispex.c:49
static BOOL is_propputref_id(DISPID id)
Definition: dispex.c:452
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 IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define IID_NULL
Definition: guiddef.h:98
DWORD LCID
Definition: nls.h:13
#define major(rdev)
Definition: propsheet.cpp:928
#define TRACE(s)
Definition: solgame.cpp:4
dispex_static_data_t * data
IDispatchEx IDispatchEx_iface
IUnknown * outer
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:65
BSTR name
Definition: dispex.c:37
unsigned short major
Definition: dispex.c:59
REFIID iid
Definition: dispex.c:58
Definition: list.h:15
Definition: name.c:39
REFIID iid
Definition: dispex.c:53
enum lib_version_t lib
Definition: dispex.c:54
#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)
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
_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:3618