ReactOS  0.4.14-dev-1112-g2b067d6
vbdisp.c File Reference
#include <assert.h>
#include "vbscript.h"
#include "wine/debug.h"
Include dependency graph for vbdisp.c:

Go to the source code of this file.

Classes

struct  _ident_map_t
 

Macros

#define FDEX_VERSION_MASK   0xf0000000
 
#define RPC_E_SERVER_UNAVAILABLE   0x800706ba
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (vbscript)
 
static BOOL is_func_id (vbdisp_t *This, DISPID id)
 
static BOOL get_func_id (vbdisp_t *This, const WCHAR *name, vbdisp_invoke_type_t invoke_type, BOOL search_private, DISPID *id)
 
HRESULT vbdisp_get_id (vbdisp_t *This, BSTR name, vbdisp_invoke_type_t invoke_type, BOOL search_private, DISPID *id)
 
static HRESULT get_propput_arg (script_ctx_t *ctx, const DISPPARAMS *dp, WORD flags, VARIANT *v, BOOL *is_owned)
 
static HRESULT invoke_variant_prop (script_ctx_t *ctx, VARIANT *v, WORD flags, DISPPARAMS *dp, VARIANT *res)
 
static HRESULT invoke_vbdisp (vbdisp_t *This, DISPID id, DWORD flags, BOOL extern_caller, DISPPARAMS *params, VARIANT *res)
 
static BOOL run_terminator (vbdisp_t *This)
 
static void clean_props (vbdisp_t *This)
 
static vbdisp_timpl_from_IDispatchEx (IDispatchEx *iface)
 
static HRESULT WINAPI DispatchEx_QueryInterface (IDispatchEx *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI DispatchEx_AddRef (IDispatchEx *iface)
 
static ULONG WINAPI DispatchEx_Release (IDispatchEx *iface)
 
static HRESULT WINAPI DispatchEx_GetTypeInfoCount (IDispatchEx *iface, UINT *pctinfo)
 
static HRESULT WINAPI DispatchEx_GetTypeInfo (IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI DispatchEx_GetIDsOfNames (IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI DispatchEx_Invoke (IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI DispatchEx_GetDispID (IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
 
static HRESULT WINAPI DispatchEx_InvokeEx (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
static HRESULT WINAPI DispatchEx_DeleteMemberByName (IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
 
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID (IDispatchEx *iface, DISPID id)
 
static HRESULT WINAPI DispatchEx_GetMemberProperties (IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
 
static HRESULT WINAPI DispatchEx_GetMemberName (IDispatchEx *iface, DISPID id, BSTR *pbstrName)
 
static HRESULT WINAPI DispatchEx_GetNextDispID (IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
 
static HRESULT WINAPI DispatchEx_GetNameSpaceParent (IDispatchEx *iface, IUnknown **ppunk)
 
static vbdisp_tunsafe_impl_from_IDispatch (IDispatch *iface)
 
HRESULT create_vbdisp (const class_desc_t *desc, vbdisp_t **ret)
 
static DISPID ident_to_id (ScriptDisp *This, ident_map_t *ident)
 
static ident_map_tid_to_ident (ScriptDisp *This, DISPID id)
 
static ident_map_tadd_ident (ScriptDisp *This, const WCHAR *name)
 
static ScriptDispScriptDisp_from_IDispatchEx (IDispatchEx *iface)
 
static HRESULT WINAPI ScriptDisp_QueryInterface (IDispatchEx *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ScriptDisp_AddRef (IDispatchEx *iface)
 
static ULONG WINAPI ScriptDisp_Release (IDispatchEx *iface)
 
static HRESULT WINAPI ScriptDisp_GetTypeInfoCount (IDispatchEx *iface, UINT *pctinfo)
 
static HRESULT WINAPI ScriptDisp_GetTypeInfo (IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI ScriptDisp_GetIDsOfNames (IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI ScriptDisp_Invoke (IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI ScriptDisp_GetDispID (IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
 
static HRESULT WINAPI ScriptDisp_InvokeEx (IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
 
static HRESULT WINAPI ScriptDisp_DeleteMemberByName (IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
 
static HRESULT WINAPI ScriptDisp_DeleteMemberByDispID (IDispatchEx *iface, DISPID id)
 
static HRESULT WINAPI ScriptDisp_GetMemberProperties (IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
 
static HRESULT WINAPI ScriptDisp_GetMemberName (IDispatchEx *iface, DISPID id, BSTR *pbstrName)
 
static HRESULT WINAPI ScriptDisp_GetNextDispID (IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
 
static HRESULT WINAPI ScriptDisp_GetNameSpaceParent (IDispatchEx *iface, IUnknown **ppunk)
 
HRESULT create_script_disp (script_ctx_t *ctx, ScriptDisp **ret)
 
void collect_objects (script_ctx_t *ctx)
 
HRESULT disp_get_id (IDispatch *disp, BSTR name, vbdisp_invoke_type_t invoke_type, BOOL search_private, DISPID *id)
 
HRESULT map_hres (HRESULT hres)
 
HRESULT disp_call (script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp, VARIANT *retv)
 
HRESULT get_disp_value (script_ctx_t *ctx, IDispatch *disp, VARIANT *v)
 
HRESULT disp_propput (script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, DISPPARAMS *dp)
 

Variables

static IDispatchExVtbl DispatchExVtbl
 
static IDispatchExVtbl ScriptDispVtbl
 

Macro Definition Documentation

◆ FDEX_VERSION_MASK

#define FDEX_VERSION_MASK   0xf0000000

Definition at line 27 of file vbdisp.c.

◆ RPC_E_SERVER_UNAVAILABLE

#define RPC_E_SERVER_UNAVAILABLE   0x800706ba

Definition at line 875 of file vbdisp.c.

Function Documentation

◆ add_ident()

static ident_map_t* add_ident ( ScriptDisp This,
const WCHAR name 
)
static

Definition at line 548 of file vbdisp.c.

549 {
550  ident_map_t *ret;
551 
552  if(!This->ident_map_size) {
553  This->ident_map = heap_alloc(4 * sizeof(*This->ident_map));
554  if(!This->ident_map)
555  return NULL;
556  This->ident_map_size = 4;
557  }else if(This->ident_map_cnt == This->ident_map_size) {
558  ident_map_t *new_map;
559 
560  new_map = heap_realloc(This->ident_map, 2*This->ident_map_size*sizeof(*new_map));
561  if(!new_map)
562  return NULL;
563  This->ident_map = new_map;
564  This->ident_map_size *= 2;
565  }
566 
567  ret = This->ident_map + This->ident_map_cnt++;
568  ret->name = name;
569  return ret;
570 }
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
int ret
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by ScriptDisp_GetDispID().

◆ clean_props()

static void clean_props ( vbdisp_t This)
static

Definition at line 253 of file vbdisp.c.

254 {
255  unsigned i;
256 
257  if(!This->desc)
258  return;
259 
260  for(i=0; i < This->desc->array_cnt; i++) {
261  if(This->arrays[i]) {
262  SafeArrayDestroy(This->arrays[i]);
263  This->arrays[i] = NULL;
264  }
265  }
266 
267  for(i=0; i < This->desc->prop_cnt; i++)
268  VariantClear(This->props+i);
269 }
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
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
Definition: safearray.c:1347
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648

Referenced by collect_objects(), and DispatchEx_Release().

◆ collect_objects()

void collect_objects ( script_ctx_t ctx)

Definition at line 835 of file vbdisp.c.

836 {
837  vbdisp_t *iter, *iter2;
838 
839  LIST_FOR_EACH_ENTRY_SAFE(iter, iter2, &ctx->objects, vbdisp_t, entry)
840  run_terminator(iter);
841 
842  while(!list_empty(&ctx->objects)) {
843  iter = LIST_ENTRY(list_head(&ctx->objects), vbdisp_t, entry);
844 
845  IDispatchEx_AddRef(&iter->IDispatchEx_iface);
846  clean_props(iter);
847  iter->desc = NULL;
848  list_remove(&iter->entry);
849  list_init(&iter->entry);
850  IDispatchEx_Release(&iter->IDispatchEx_iface);
851  }
852 }
struct list objects
Definition: vbscript.h:202
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
smooth NULL
Definition: ftsmooth.c:416
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
static void clean_props(vbdisp_t *This)
Definition: vbdisp.c:253
IDispatchEx IDispatchEx_iface
Definition: vbscript.h:117
uint32_t entry
Definition: isohybrid.c:63
const class_desc_t * desc
Definition: vbscript.h:123
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
struct list entry
Definition: vbscript.h:121
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
#define LIST_ENTRY(type)
Definition: queue.h:175
static BOOL run_terminator(vbdisp_t *This)
Definition: vbdisp.c:236

◆ create_script_disp()

HRESULT create_script_disp ( script_ctx_t ctx,
ScriptDisp **  ret 
)

Definition at line 819 of file vbdisp.c.

820 {
822 
823  script_disp = heap_alloc_zero(sizeof(*script_disp));
824  if(!script_disp)
825  return E_OUTOFMEMORY;
826 
827  script_disp->IDispatchEx_iface.lpVtbl = &ScriptDispVtbl;
828  script_disp->ref = 1;
829  script_disp->ctx = ctx;
830 
831  *ret = script_disp;
832  return S_OK;
833 }
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static IDispatchExVtbl ScriptDispVtbl
Definition: vbdisp.c:801
int ret
static IDispatch * script_disp
Definition: run.c:178
#define S_OK
Definition: intsafe.h:59

Referenced by VBScript_SetScriptSite().

◆ create_vbdisp()

HRESULT create_vbdisp ( const class_desc_t desc,
vbdisp_t **  ret 
)

Definition at line 470 of file vbdisp.c.

471 {
472  vbdisp_t *vbdisp;
473  HRESULT hres = S_OK;
474 
475  vbdisp = heap_alloc_zero( FIELD_OFFSET( vbdisp_t, props[desc->prop_cnt] ));
476  if(!vbdisp)
477  return E_OUTOFMEMORY;
478 
479  vbdisp->IDispatchEx_iface.lpVtbl = &DispatchExVtbl;
480  vbdisp->ref = 1;
481  vbdisp->desc = desc;
482 
483  list_add_tail(&desc->ctx->objects, &vbdisp->entry);
484 
485  if(desc->array_cnt) {
486  vbdisp->arrays = heap_alloc_zero(desc->array_cnt * sizeof(*vbdisp->arrays));
487  if(vbdisp->arrays) {
488  unsigned i, j;
489 
490  for(i=0; i < desc->array_cnt; i++) {
491  if(!desc->array_descs[i].dim_cnt)
492  continue;
493 
494  vbdisp->arrays[i] = SafeArrayCreate(VT_VARIANT, desc->array_descs[i].dim_cnt, desc->array_descs[i].bounds);
495  if(!vbdisp->arrays[i]) {
497  break;
498  }
499  }
500 
501  if(SUCCEEDED(hres)) {
502  for(i=0, j=0; i < desc->prop_cnt; i++) {
503  if(desc->props[i].is_array) {
504  V_VT(vbdisp->props+i) = VT_ARRAY|VT_BYREF|VT_VARIANT;
505  V_ARRAYREF(vbdisp->props+i) = vbdisp->arrays + j++;
506  }
507  }
508  }
509  }else {
511  }
512  }
513 
514  if(SUCCEEDED(hres) && desc->class_initialize_id) {
515  DISPPARAMS dp = {0};
516  hres = exec_script(desc->ctx, FALSE, desc->funcs[desc->class_initialize_id].entries[VBDISP_CALLGET],
517  vbdisp, &dp, NULL);
518  }
519 
520  if(FAILED(hres)) {
521  IDispatchEx_Release(&vbdisp->IDispatchEx_iface);
522  return hres;
523  }
524 
525  *ret = vbdisp;
526  return S_OK;
527 }
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
LONG ref
Definition: vbscript.h:119
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
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const WCHAR desc[]
Definition: protectdata.c:36
#define V_ARRAYREF(A)
Definition: oleauto.h:223
smooth NULL
Definition: ftsmooth.c:416
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 GLint GLint j
Definition: glfuncs.h:250
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
IDispatchEx IDispatchEx_iface
Definition: vbscript.h:117
int ret
static IDispatchExVtbl DispatchExVtbl
Definition: vbdisp.c:445
#define V_VT(A)
Definition: oleauto.h:211
VARIANT props[1]
Definition: vbscript.h:125
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
Definition: safearray.c:600
const class_desc_t * desc
Definition: vbscript.h:123
#define S_OK
Definition: intsafe.h:59
HRESULT exec_script(HTMLInnerWindow *, const WCHAR *, const WCHAR *, VARIANT *) DECLSPEC_HIDDEN
Definition: script.c:1245
struct list entry
Definition: vbscript.h:121
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
static const WCHAR props[]
Definition: wbemdisp.c:288
struct stdole::DISPPARAMS DISPPARAMS
#define SUCCEEDED(hr)
Definition: intsafe.h:57
SAFEARRAY ** arrays
Definition: vbscript.h:124

Referenced by interp_new(), and VBScriptParseProcedure_ParseProcedureText().

◆ disp_call()

HRESULT disp_call ( script_ctx_t ctx,
IDispatch disp,
DISPID  id,
DISPPARAMS *  dp,
VARIANT retv 
)

Definition at line 938 of file vbdisp.c.

939 {
940  const WORD flags = DISPATCH_METHOD|(retv ? DISPATCH_PROPERTYGET : 0);
941  IDispatchEx *dispex;
942  vbdisp_t *vbdisp;
943  EXCEPINFO ei;
944  HRESULT hres;
945 
946  memset(&ei, 0, sizeof(ei));
947  if(retv)
948  V_VT(retv) = VT_EMPTY;
949 
951  if(vbdisp && vbdisp->desc && vbdisp->desc->ctx == ctx)
952  return invoke_vbdisp(vbdisp, id, flags, FALSE, dp, retv);
953 
954  hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
955  if(FAILED(hres)) {
956  UINT err = 0;
957 
958  TRACE("using IDispatch\n");
959  return IDispatch_Invoke(disp, id, &IID_NULL, ctx->lcid, flags, dp, retv, &ei, &err);
960  }
961 
962  hres = IDispatchEx_InvokeEx(dispex, id, ctx->lcid, flags, dp, retv, &ei, NULL /* CALLER_FIXME */);
963  IDispatchEx_Release(dispex);
964  return hres;
965 }
disp
Definition: i386-dis.c:3181
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
script_ctx_t * ctx
Definition: vbscript.h:98
#define DISPATCH_METHOD
Definition: oleauto.h:1006
static HRESULT invoke_vbdisp(vbdisp_t *This, DISPID id, DWORD flags, BOOL extern_caller, DISPPARAMS *params, VARIANT *res)
Definition: vbdisp.c:164
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
unsigned short WORD
Definition: ntddk_ex.h:93
GLbitfield flags
Definition: glext.h:7161
#define IID_NULL
Definition: guiddef.h:98
#define V_VT(A)
Definition: oleauto.h:211
#define err(...)
struct stdole::EXCEPINFO EXCEPINFO
const class_desc_t * desc
Definition: vbscript.h:123
unsigned int UINT
Definition: ndis.h:50
#define memset(x, y, z)
Definition: compat.h:39
static vbdisp_t * unsafe_impl_from_IDispatch(IDispatch *iface)
Definition: vbdisp.c:463

Referenced by get_disp_value().

◆ disp_get_id()

HRESULT disp_get_id ( IDispatch disp,
BSTR  name,
vbdisp_invoke_type_t  invoke_type,
BOOL  search_private,
DISPID id 
)

Definition at line 854 of file vbdisp.c.

855 {
856  IDispatchEx *dispex;
857  vbdisp_t *vbdisp;
858  HRESULT hres;
859 
861  if(vbdisp)
862  return vbdisp_get_id(vbdisp, name, invoke_type, search_private, id);
863 
864  hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
865  if(FAILED(hres)) {
866  TRACE("using IDispatch\n");
867  return IDispatch_GetIDsOfNames(disp, &IID_NULL, &name, 1, 0, id);
868  }
869 
870  hres = IDispatchEx_GetDispID(dispex, name, fdexNameCaseInsensitive, id);
871  IDispatchEx_Release(dispex);
872  return hres;
873 }
disp
Definition: i386-dis.c:3181
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
#define IID_NULL
Definition: guiddef.h:98
HRESULT vbdisp_get_id(vbdisp_t *This, BSTR name, vbdisp_invoke_type_t invoke_type, BOOL search_private, DISPID *id)
Definition: vbdisp.c:59
Definition: name.c:38
static vbdisp_t * unsafe_impl_from_IDispatch(IDispatch *iface)
Definition: vbdisp.c:463

◆ disp_propput()

HRESULT disp_propput ( script_ctx_t ctx,
IDispatch disp,
DISPID  id,
WORD  flags,
DISPPARAMS *  dp 
)

Definition at line 975 of file vbdisp.c.

976 {
977  IDispatchEx *dispex;
978  vbdisp_t *vbdisp;
979  EXCEPINFO ei = {0};
980  HRESULT hres;
981 
983  if(vbdisp && vbdisp->desc && vbdisp->desc->ctx == ctx)
984  return invoke_vbdisp(vbdisp, id, flags, FALSE, dp, NULL);
985 
986  hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
987  if(SUCCEEDED(hres)) {
988  hres = IDispatchEx_InvokeEx(dispex, id, ctx->lcid, flags, dp, NULL, &ei, NULL /* FIXME! */);
989  IDispatchEx_Release(dispex);
990  }else {
991  ULONG err = 0;
992 
993  TRACE("using IDispatch\n");
994  hres = IDispatch_Invoke(disp, id, &IID_NULL, ctx->lcid, flags, dp, NULL, &ei, &err);
995  }
996 
997  return hres;
998 }
disp
Definition: i386-dis.c:3181
script_ctx_t * ctx
Definition: vbscript.h:98
static HRESULT invoke_vbdisp(vbdisp_t *This, DISPID id, DWORD flags, BOOL extern_caller, DISPPARAMS *params, VARIANT *res)
Definition: vbdisp.c:164
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
GLbitfield flags
Definition: glext.h:7161
#define IID_NULL
Definition: guiddef.h:98
#define err(...)
struct stdole::EXCEPINFO EXCEPINFO
const class_desc_t * desc
Definition: vbscript.h:123
unsigned int ULONG
Definition: retypes.h:1
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static vbdisp_t * unsafe_impl_from_IDispatch(IDispatch *iface)
Definition: vbdisp.c:463

◆ DispatchEx_AddRef()

static ULONG WINAPI DispatchEx_AddRef ( IDispatchEx *  iface)
static

Definition at line 299 of file vbdisp.c.

300 {
303 
304  TRACE("(%p) ref=%d\n", This, ref);
305 
306  return ref;
307 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define InterlockedIncrement
Definition: armddk.h:53

◆ DispatchEx_DeleteMemberByDispID()

static HRESULT WINAPI DispatchEx_DeleteMemberByDispID ( IDispatchEx *  iface,
DISPID  id 
)
static

Definition at line 410 of file vbdisp.c.

411 {
413  FIXME("(%p)->(%x)\n", This, id);
414  return E_NOTIMPL;
415 }
#define FIXME(fmt,...)
Definition: debug.h:110
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DispatchEx_DeleteMemberByName()

static HRESULT WINAPI DispatchEx_DeleteMemberByName ( IDispatchEx *  iface,
BSTR  bstrName,
DWORD  grfdex 
)
static

Definition at line 403 of file vbdisp.c.

404 {
406  FIXME("(%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex);
407  return E_NOTIMPL;
408 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DispatchEx_GetDispID()

static HRESULT WINAPI DispatchEx_GetDispID ( IDispatchEx *  iface,
BSTR  bstrName,
DWORD  grfdex,
DISPID pid 
)
static

Definition at line 366 of file vbdisp.c.

367 {
369 
370  TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid);
371 
372  grfdex &= ~FDEX_VERSION_MASK;
373 
374  if(!This->desc)
375  return E_UNEXPECTED;
376 
377  /* Tests show that fdexNameCaseSensitive is ignored */
378 
379  if(grfdex & ~(fdexNameEnsure|fdexNameCaseInsensitive|fdexNameCaseSensitive)) {
380  FIXME("unsupported flags %x\n", grfdex);
381  return E_NOTIMPL;
382  }
383 
384  return vbdisp_get_id(This, bstrName, VBDISP_ANY, FALSE, pid);
385 }
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
#define FDEX_VERSION_MASK
Definition: vbdisp.c:27
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRACE(s)
Definition: solgame.cpp:4
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
HRESULT vbdisp_get_id(vbdisp_t *This, BSTR name, vbdisp_invoke_type_t invoke_type, BOOL search_private, DISPID *id)
Definition: vbdisp.c:59
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ DispatchEx_GetIDsOfNames()

static HRESULT WINAPI DispatchEx_GetIDsOfNames ( IDispatchEx *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 344 of file vbdisp.c.

347 {
349  FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
350  lcid, rgDispId);
351  return E_NOTIMPL;
352 }
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DispatchEx_GetMemberName()

static HRESULT WINAPI DispatchEx_GetMemberName ( IDispatchEx *  iface,
DISPID  id,
BSTR pbstrName 
)
static

Definition at line 424 of file vbdisp.c.

425 {
427  FIXME("(%p)->(%x %p)\n", This, id, pbstrName);
428  return E_NOTIMPL;
429 }
#define FIXME(fmt,...)
Definition: debug.h:110
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DispatchEx_GetMemberProperties()

static HRESULT WINAPI DispatchEx_GetMemberProperties ( IDispatchEx *  iface,
DISPID  id,
DWORD  grfdexFetch,
DWORD pgrfdex 
)
static

Definition at line 417 of file vbdisp.c.

418 {
420  FIXME("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex);
421  return E_NOTIMPL;
422 }
#define FIXME(fmt,...)
Definition: debug.h:110
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DispatchEx_GetNameSpaceParent()

static HRESULT WINAPI DispatchEx_GetNameSpaceParent ( IDispatchEx *  iface,
IUnknown **  ppunk 
)
static

Definition at line 438 of file vbdisp.c.

439 {
441  FIXME("(%p)->(%p)\n", This, ppunk);
442  return E_NOTIMPL;
443 }
#define FIXME(fmt,...)
Definition: debug.h:110
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DispatchEx_GetNextDispID()

static HRESULT WINAPI DispatchEx_GetNextDispID ( IDispatchEx *  iface,
DWORD  grfdex,
DISPID  id,
DISPID pid 
)
static

Definition at line 431 of file vbdisp.c.

432 {
434  FIXME("(%p)->(%x %x %p)\n", This, grfdex, id, pid);
435  return E_NOTIMPL;
436 }
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
#define FIXME(fmt,...)
Definition: debug.h:110
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DispatchEx_GetTypeInfo()

static HRESULT WINAPI DispatchEx_GetTypeInfo ( IDispatchEx *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 336 of file vbdisp.c.

338 {
340  FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
341  return E_NOTIMPL;
342 }
#define FIXME(fmt,...)
Definition: debug.h:110
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ DispatchEx_GetTypeInfoCount()

static HRESULT WINAPI DispatchEx_GetTypeInfoCount ( IDispatchEx *  iface,
UINT pctinfo 
)
static

Definition at line 326 of file vbdisp.c.

327 {
329 
330  TRACE("(%p)->(%p)\n", This, pctinfo);
331 
332  *pctinfo = 1;
333  return S_OK;
334 }
#define TRACE(s)
Definition: solgame.cpp:4
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define S_OK
Definition: intsafe.h:59

◆ DispatchEx_Invoke()

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

Definition at line 354 of file vbdisp.c.

357 {
359 
360  TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
361  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
362 
363  return IDispatchEx_InvokeEx(&This->IDispatchEx_iface, dispIdMember, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, NULL);
364 }
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534

◆ DispatchEx_InvokeEx()

static HRESULT WINAPI DispatchEx_InvokeEx ( IDispatchEx *  iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 387 of file vbdisp.c.

389 {
391 
392  TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
393 
394  if(!This->desc)
395  return E_UNEXPECTED;
396 
397  if(pvarRes)
398  V_VT(pvarRes) = VT_EMPTY;
399 
400  return invoke_vbdisp(This, id, wFlags, TRUE, pdp, pvarRes);
401 }
#define TRUE
Definition: types.h:120
static HRESULT invoke_vbdisp(vbdisp_t *This, DISPID id, DWORD flags, BOOL extern_caller, DISPPARAMS *params, VARIANT *res)
Definition: vbdisp.c:164
#define TRACE(s)
Definition: solgame.cpp:4
#define V_VT(A)
Definition: oleauto.h:211
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ DispatchEx_QueryInterface()

static HRESULT WINAPI DispatchEx_QueryInterface ( IDispatchEx *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 276 of file vbdisp.c.

277 {
279 
280  if(IsEqualGUID(&IID_IUnknown, riid)) {
281  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
282  *ppv = &This->IDispatchEx_iface;
283  }else if(IsEqualGUID(&IID_IDispatch, riid)) {
284  TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
285  *ppv = &This->IDispatchEx_iface;
286  }else if(IsEqualGUID(&IID_IDispatchEx, riid)) {
287  TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv);
288  *ppv = &This->IDispatchEx_iface;
289  }else {
290  WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
291  *ppv = NULL;
292  return E_NOINTERFACE;
293  }
294 
295  IUnknown_AddRef((IUnknown*)*ppv);
296  return S_OK;
297 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ DispatchEx_Release()

static ULONG WINAPI DispatchEx_Release ( IDispatchEx *  iface)
static

Definition at line 309 of file vbdisp.c.

310 {
313 
314  TRACE("(%p) ref=%d\n", This, ref);
315 
316  if(!ref && run_terminator(This)) {
317  clean_props(This);
318  list_remove(&This->entry);
319  heap_free(This->arrays);
320  heap_free(This);
321  }
322 
323  return ref;
324 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
static void clean_props(vbdisp_t *This)
Definition: vbdisp.c:253
#define InterlockedDecrement
Definition: armddk.h:52
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:271
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static BOOL run_terminator(vbdisp_t *This)
Definition: vbdisp.c:236

◆ get_disp_value()

HRESULT get_disp_value ( script_ctx_t ctx,
IDispatch disp,
VARIANT v 
)

Definition at line 967 of file vbdisp.c.

968 {
969  DISPPARAMS dp = {NULL};
970  if(!disp)
972  return disp_call(ctx, disp, DISPID_VALUE, &dp, v);
973 }
disp
Definition: i386-dis.c:3181
smooth NULL
Definition: ftsmooth.c:416
const GLdouble * v
Definition: gl.h:2040
#define MAKE_VBSERROR(code)
Definition: vbscript.h:379
#define VBSE_OBJECT_VARIABLE_NOT_SET
struct stdole::DISPPARAMS DISPPARAMS
HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp, VARIANT *retv)
Definition: vbdisp.c:938

Referenced by assign_value(), get_propput_arg(), stack_assume_val(), and stack_pop_val().

◆ get_func_id()

static BOOL get_func_id ( vbdisp_t This,
const WCHAR name,
vbdisp_invoke_type_t  invoke_type,
BOOL  search_private,
DISPID id 
)
static

Definition at line 34 of file vbdisp.c.

35 {
36  unsigned i;
37 
38  for(i = invoke_type == VBDISP_ANY ? 0 : 1; i < This->desc->func_cnt; i++) {
39  if(invoke_type == VBDISP_ANY) {
40  if(!search_private && !This->desc->funcs[i].is_public)
41  continue;
42  if(!i && !This->desc->funcs[0].name) /* default value may not exist */
43  continue;
44  }else {
45  if(!This->desc->funcs[i].entries[invoke_type]
46  || (!search_private && !This->desc->funcs[i].entries[invoke_type]->is_public))
47  continue;
48  }
49 
50  if(!wcsicmp(This->desc->funcs[i].name, name)) {
51  *id = i;
52  return TRUE;
53  }
54  }
55 
56  return FALSE;
57 }
#define TRUE
Definition: types.h:120
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
#define wcsicmp
Definition: string.h:1152
Definition: name.c:38

Referenced by vbdisp_get_id().

◆ get_propput_arg()

static HRESULT get_propput_arg ( script_ctx_t ctx,
const DISPPARAMS *  dp,
WORD  flags,
VARIANT v,
BOOL is_owned 
)
static

Definition at line 80 of file vbdisp.c.

81 {
82  unsigned i;
83 
84  for(i=0; i < dp->cNamedArgs; i++) {
85  if(dp->rgdispidNamedArgs[i] == DISPID_PROPERTYPUT)
86  break;
87  }
88  if(i == dp->cNamedArgs) {
89  WARN("no value to set\n");
91  }
92 
93  *v = dp->rgvarg[i];
94  if(V_VT(v) == (VT_VARIANT|VT_BYREF))
95  *v = *V_VARIANTREF(v);
96  *is_owned = FALSE;
97 
98  if(V_VT(v) == VT_DISPATCH) {
100  HRESULT hres;
101 
102  hres = get_disp_value(ctx, V_DISPATCH(v), v);
103  if(FAILED(hres))
104  return hres;
105 
106  *is_owned = TRUE;
107  }
108  }else if(!(flags & DISPATCH_PROPERTYPUT)) {
109  WARN("%s can't be assigned without DISPATCH_PROPERTYPUT flag\n", debugstr_variant(v));
110  return DISP_E_EXCEPTION;
111  }
112 
113  return S_OK;
114 }
#define DISP_E_EXCEPTION
Definition: winerror.h:2518
#define TRUE
Definition: types.h:120
#define WARN(fmt,...)
Definition: debug.h:111
HRESULT get_disp_value(script_ctx_t *ctx, IDispatch *disp, VARIANT *v)
Definition: vbdisp.c:967
#define V_DISPATCH(A)
Definition: oleauto.h:239
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
#define DISPATCH_PROPERTYPUT
Definition: oleauto.h:1008
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
GLbitfield flags
Definition: glext.h:7161
#define DISP_E_PARAMNOTOPTIONAL
Definition: winerror.h:2524
#define V_VT(A)
Definition: oleauto.h:211
#define DISPATCH_PROPERTYPUTREF
Definition: oleauto.h:1009
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:59
const GLdouble * v
Definition: gl.h:2040
#define V_VARIANTREF(A)
Definition: oleauto.h:283

Referenced by invoke_variant_prop(), and invoke_vbdisp().

◆ id_to_ident()

static ident_map_t* id_to_ident ( ScriptDisp This,
DISPID  id 
)
inlinestatic

Definition at line 543 of file vbdisp.c.

544 {
545  return 0 < id && id <= This->ident_map_cnt ? This->ident_map+id-1 : NULL;
546 }
smooth NULL
Definition: ftsmooth.c:416

Referenced by ScriptDisp_InvokeEx().

◆ ident_to_id()

static DISPID ident_to_id ( ScriptDisp This,
ident_map_t ident 
)
inlinestatic

Definition at line 538 of file vbdisp.c.

539 {
540  return (ident-This->ident_map)+1;
541 }
_In_ ULONG _In_ ULONG_PTR ident
Definition: winddi.h:3993

Referenced by ScriptDisp_GetDispID().

◆ impl_from_IDispatchEx()

static vbdisp_t* impl_from_IDispatchEx ( IDispatchEx *  iface)
inlinestatic

Definition at line 271 of file vbdisp.c.

272 {
273  return CONTAINING_RECORD(iface, vbdisp_t, IDispatchEx_iface);
274 }
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

Referenced by DispatchEx_AddRef(), DispatchEx_DeleteMemberByDispID(), DispatchEx_DeleteMemberByName(), DispatchEx_GetDispID(), DispatchEx_GetIDsOfNames(), DispatchEx_GetMemberName(), DispatchEx_GetMemberProperties(), DispatchEx_GetNameSpaceParent(), DispatchEx_GetNextDispID(), DispatchEx_GetTypeInfo(), DispatchEx_GetTypeInfoCount(), DispatchEx_Invoke(), DispatchEx_InvokeEx(), DispatchEx_QueryInterface(), and DispatchEx_Release().

◆ invoke_variant_prop()

static HRESULT invoke_variant_prop ( script_ctx_t ctx,
VARIANT v,
WORD  flags,
DISPPARAMS *  dp,
VARIANT res 
)
static

Definition at line 116 of file vbdisp.c.

117 {
118  HRESULT hres;
119 
120  switch(flags) {
123  if(dp->cArgs) {
124  WARN("called with arguments\n");
125  return DISP_E_MEMBERNOTFOUND; /* That's what tests show */
126  }
127 
128  hres = VariantCopyInd(res, v);
129  break;
130 
134  VARIANT put_val;
135  BOOL own_val;
136 
137  hres = get_propput_arg(ctx, dp, flags, &put_val, &own_val);
138  if(FAILED(hres))
139  return hres;
140 
141  if(arg_cnt(dp)) {
142  FIXME("Arguments not supported\n");
143  return E_NOTIMPL;
144  }
145 
146  if(res)
147  V_VT(res) = VT_EMPTY;
148 
149  if(own_val)
150  *v = put_val;
151  else
152  hres = VariantCopyInd(v, &put_val);
153  break;
154  }
155 
156  default:
157  FIXME("unimplemented flags %x\n", flags);
158  return E_NOTIMPL;
159  }
160 
161  return hres;
162 }
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define WARN(fmt,...)
Definition: debug.h:111
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512
HRESULT WINAPI VariantCopyInd(VARIANT *pvargDest, VARIANTARG *pvargSrc)
Definition: variant.c:847
#define DISPATCH_METHOD
Definition: oleauto.h:1006
unsigned int BOOL
Definition: ntddk_ex.h:94
static HRESULT get_propput_arg(script_ctx_t *ctx, const DISPPARAMS *dp, WORD flags, VARIANT *v, BOOL *is_owned)
Definition: vbdisp.c:80
#define FIXME(fmt,...)
Definition: debug.h:110
#define DISPATCH_PROPERTYPUT
Definition: oleauto.h:1008
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
GLbitfield flags
Definition: glext.h:7161
#define V_VT(A)
Definition: oleauto.h:211
#define DISPATCH_PROPERTYPUTREF
Definition: oleauto.h:1009
static unsigned arg_cnt(const DISPPARAMS *dp)
Definition: vbscript.h:162
const GLdouble * v
Definition: gl.h:2040
#define E_NOTIMPL
Definition: ddrawi.h:99
GLuint res
Definition: glext.h:9613

Referenced by invoke_vbdisp(), and ScriptDisp_InvokeEx().

◆ invoke_vbdisp()

static HRESULT invoke_vbdisp ( vbdisp_t This,
DISPID  id,
DWORD  flags,
BOOL  extern_caller,
DISPPARAMS *  params,
VARIANT res 
)
static

Definition at line 164 of file vbdisp.c.

165 {
166  if(id < 0)
167  return DISP_E_MEMBERNOTFOUND;
168 
169  if(is_func_id(This, id)) {
170  function_t *func;
171 
172  TRACE("%p->%s\n", This, debugstr_w(This->desc->funcs[id].name));
173 
174  switch(flags) {
176  func = This->desc->funcs[id].entries[VBDISP_CALLGET];
177  if(!func || (func->type != FUNC_PROPGET && func->type != FUNC_DEFGET)) {
178  WARN("no getter\n");
179  return DISP_E_MEMBERNOTFOUND;
180  }
181 
182  return exec_script(This->desc->ctx, extern_caller, func, This, params, res);
183 
184  case DISPATCH_METHOD:
186  func = This->desc->funcs[id].entries[VBDISP_CALLGET];
187  if(!func) {
188  FIXME("no invoke/getter\n");
189  return DISP_E_MEMBERNOTFOUND;
190  }
191 
192  return exec_script(This->desc->ctx, extern_caller, func, This, params, res);
193 
197  DISPPARAMS dp = {NULL, NULL, 1, 0};
198  BOOL needs_release;
199  VARIANT put_val;
200  HRESULT hres;
201 
202  if(arg_cnt(params)) {
203  FIXME("arguments not implemented\n");
204  return E_NOTIMPL;
205  }
206 
207  hres = get_propput_arg(This->desc->ctx, params, flags, &put_val, &needs_release);
208  if(FAILED(hres))
209  return hres;
210 
211  dp.rgvarg = &put_val;
212  func = This->desc->funcs[id].entries[V_VT(&put_val) == VT_DISPATCH ? VBDISP_SET : VBDISP_LET];
213  if(!func) {
214  FIXME("no letter/setter\n");
215  return DISP_E_MEMBERNOTFOUND;
216  }
217 
218  hres = exec_script(This->desc->ctx, extern_caller, func, This, &dp, NULL);
219  if(needs_release)
220  VariantClear(&put_val);
221  return hres;
222  }
223  default:
224  FIXME("flags %x\n", flags);
225  return DISP_E_MEMBERNOTFOUND;
226  }
227  }
228 
229  if(id >= This->desc->prop_cnt + This->desc->func_cnt)
230  return DISP_E_MEMBERNOTFOUND;
231 
232  TRACE("%p->%s\n", This, debugstr_w(This->desc->props[id - This->desc->func_cnt].name));
233  return invoke_variant_prop(This->desc->ctx, This->props+(id-This->desc->func_cnt), flags, params, res);
234 }
static HRESULT invoke_variant_prop(script_ctx_t *ctx, VARIANT *v, WORD flags, DISPPARAMS *dp, VARIANT *res)
Definition: vbdisp.c:116
GLenum func
Definition: glext.h:6028
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define WARN(fmt,...)
Definition: debug.h:111
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512
#define DISPATCH_METHOD
Definition: oleauto.h:1006
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned int BOOL
Definition: ntddk_ex.h:94
static HRESULT get_propput_arg(script_ctx_t *ctx, const DISPPARAMS *dp, WORD flags, VARIANT *v, BOOL *is_owned)
Definition: vbdisp.c:80
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define DISPATCH_PROPERTYPUT
Definition: oleauto.h:1008
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
GLbitfield flags
Definition: glext.h:7161
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
#define V_VT(A)
Definition: oleauto.h:211
#define DISPATCH_PROPERTYPUTREF
Definition: oleauto.h:1009
static unsigned arg_cnt(const DISPPARAMS *dp)
Definition: vbscript.h:162
HRESULT exec_script(HTMLInnerWindow *, const WCHAR *, const WCHAR *, VARIANT *) DECLSPEC_HIDDEN
Definition: script.c:1245
#define E_NOTIMPL
Definition: ddrawi.h:99
GLuint res
Definition: glext.h:9613
struct stdole::DISPPARAMS DISPPARAMS
GLenum GLuint id
Definition: glext.h:5579
static BOOL is_func_id(vbdisp_t *This, DISPID id)
Definition: vbdisp.c:29

Referenced by disp_call(), disp_propput(), and DispatchEx_InvokeEx().

◆ is_func_id()

static BOOL is_func_id ( vbdisp_t This,
DISPID  id 
)
inlinestatic

Definition at line 29 of file vbdisp.c.

30 {
31  return id < This->desc->func_cnt;
32 }

Referenced by invoke_vbdisp().

◆ map_hres()

HRESULT map_hres ( HRESULT  hres)

Definition at line 877 of file vbdisp.c.

878 {
880  return hres;
881 
882  switch(hres) {
933  }
934 
935  return hres;
936 }
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515
#define VBSE_NAMED_PARAM_NOT_FOUND
#define E_ACCESSDENIED
Definition: winerror.h:2849
#define VBSE_PATH_FILE_ACCESS
#define VBSE_OLE_NO_PROP_OR_METHOD
#define STG_E_INVALIDNAME
Definition: winerror.h:2584
#define STG_E_WRITEFAULT
Definition: winerror.h:2575
#define E_NOINTERFACE
Definition: winerror.h:2364
#define CO_E_APPDIDNTREG
Definition: winerror.h:2817
#define VBSE_CANT_CREATE_OBJECT
#define VBSE_LOCALE_SETTING_NOT_SUPPORTED
#define STG_E_NOTCURRENT
Definition: winerror.h:2589
#define CO_E_SERVER_EXEC_FAILURE
Definition: winerror.h:2860
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512
#define VBSE_TOO_MANY_FILES
#define STG_E_NOMOREFILES
Definition: winerror.h:2572
#define VBSE_OLE_FILE_NOT_FOUND
#define STG_E_MEDIUMFULL
Definition: winerror.h:2581
#define VBSE_DISK_FULL
#define STG_E_INSUFFICIENTMEMORY
Definition: winerror.h:2570
#define VBSE_TYPE_MISMATCH
#define STG_E_TOOMANYOPENFILES
Definition: winerror.h:2567
#define DISP_E_ARRAYISLOCKED
Definition: winerror.h:2522
#define DISP_E_PARAMNOTFOUND
Definition: winerror.h:2513
#define VBSE_ILLEGAL_FUNC_CALL
#define STG_E_INUSE
Definition: winerror.h:2588
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define VBSE_INVALID_TYPELIB_VARIABLE
#define STG_E_ACCESSDENIED
Definition: winerror.h:2568
#define STG_E_PATHNOTFOUND
Definition: winerror.h:2566
#define HRESULT_FACILITY(hr)
Definition: winerror.h:79
#define E_INVALIDARG
Definition: ddrawi.h:101
#define DISP_E_NONAMEDARGS
Definition: winerror.h:2516
#define TYPE_E_OUTOFBOUNDS
Definition: winerror.h:2549
#define VBSE_PERMISSION_DENIED
#define DISP_E_UNKNOWNLCID
Definition: winerror.h:2521
#define VBSE_NAMED_ARGS_NOT_SUPPORTED
#define VBSE_PATH_NOT_FOUND
#define MK_E_INVALIDEXTENSION
Definition: winerror.h:2787
#define MK_E_CANTOPENFILE
Definition: winerror.h:2791
#define TYPE_E_DLLFUNCTIONNOTFOUND
Definition: winerror.h:2543
#define VBSE_FILE_ALREADY_EXISTS
#define STG_E_SHAREVIOLATION
Definition: winerror.h:2577
#define DISP_E_TYPEMISMATCH
Definition: winerror.h:2514
HRESULT hres
Definition: protocol.c:465
#define TYPE_E_TYPEMISMATCH
Definition: winerror.h:2548
#define STG_E_FILEALREADYEXISTS
Definition: winerror.h:2579
#define VBSE_OUT_OF_BOUNDS
#define DISP_E_UNKNOWNINTERFACE
Definition: winerror.h:2511
#define VBSE_FILE_NOT_FOUND
#define VBSE_FUNC_ARITY_MISMATCH
#define DISP_E_BADVARTYPE
Definition: winerror.h:2517
#define VBSE_CANT_CREATE_TMP_FILE
#define STG_E_FILENOTFOUND
Definition: winerror.h:2565
#define DISP_E_PARAMNOTOPTIONAL
Definition: winerror.h:2524
#define VBSE_ARRAY_LOCKED
#define VBSE_NOT_ENUM
#define VBSE_OUT_OF_MEMORY
#define VBSE_INVALID_DLL_FUNCTION_NAME
#define STG_E_DISKISWRITEPROTECTED
Definition: winerror.h:2573
#define REGDB_E_CLASSNOTREG
Definition: winerror.h:2696
#define STG_E_LOCKVIOLATION
Definition: winerror.h:2578
#define MAKE_VBSERROR(code)
Definition: vbscript.h:379
#define VBSE_OLE_NOT_SUPPORTED
#define E_NOTIMPL
Definition: ddrawi.h:99
#define STG_E_READFAULT
Definition: winerror.h:2576
#define TYPE_E_IOERROR
Definition: winerror.h:2550
#define DISP_E_BADPARAMCOUNT
Definition: winerror.h:2523
#define MK_E_UNAVAILABLE
Definition: winerror.h:2784
#define FACILITY_VBS
Definition: vbscript.h:378
#define VBSE_OVERFLOW
#define DISP_E_NOTACOLLECTION
Definition: winerror.h:2526
#define TYPE_E_CANTCREATETMPFILE
Definition: winerror.h:2551
#define VBSE_PARAMETER_NOT_OPTIONAL
#define VBSE_IO_ERROR
#define CO_E_CLASSSTRING
Definition: winerror.h:2806
#define DISP_E_BADINDEX
Definition: winerror.h:2520
#define CO_E_APPNOTFOUND
Definition: winerror.h:2808
#define STG_E_CANTSAVE
Definition: winerror.h:2591
#define DISP_E_OVERFLOW
Definition: winerror.h:2519
#define VBSE_ACTION_NOT_SUPPORTED
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define RPC_E_SERVER_UNAVAILABLE
Definition: vbdisp.c:875
#define VBSE_SERVER_NOT_FOUND

◆ run_terminator()

static BOOL run_terminator ( vbdisp_t This)
static

Definition at line 236 of file vbdisp.c.

237 {
238  DISPPARAMS dp = {0};
239 
240  if(This->terminator_ran)
241  return TRUE;
242  This->terminator_ran = TRUE;
243 
244  if(!This->desc->class_terminate_id)
245  return TRUE;
246 
247  This->ref++;
248  exec_script(This->desc->ctx, FALSE, This->desc->funcs[This->desc->class_terminate_id].entries[VBDISP_CALLGET],
249  This, &dp, NULL);
250  return !--This->ref;
251 }
#define TRUE
Definition: types.h:120
smooth NULL
Definition: ftsmooth.c:416
HRESULT exec_script(HTMLInnerWindow *, const WCHAR *, const WCHAR *, VARIANT *) DECLSPEC_HIDDEN
Definition: script.c:1245
struct stdole::DISPPARAMS DISPPARAMS

Referenced by collect_objects(), and DispatchEx_Release().

◆ ScriptDisp_AddRef()

static ULONG WINAPI ScriptDisp_AddRef ( IDispatchEx *  iface)
static

Definition at line 600 of file vbdisp.c.

601 {
604 
605  TRACE("(%p) ref=%d\n", This, ref);
606 
607  return ref;
608 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define InterlockedIncrement
Definition: armddk.h:53

◆ ScriptDisp_DeleteMemberByDispID()

static HRESULT WINAPI ScriptDisp_DeleteMemberByDispID ( IDispatchEx *  iface,
DISPID  id 
)
static

Definition at line 766 of file vbdisp.c.

767 {
769  FIXME("(%p)->(%x)\n", This, id);
770  return E_NOTIMPL;
771 }
#define FIXME(fmt,...)
Definition: debug.h:110
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ScriptDisp_DeleteMemberByName()

static HRESULT WINAPI ScriptDisp_DeleteMemberByName ( IDispatchEx *  iface,
BSTR  bstrName,
DWORD  grfdex 
)
static

Definition at line 759 of file vbdisp.c.

760 {
762  FIXME("(%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex);
763  return E_NOTIMPL;
764 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ScriptDisp_from_IDispatchEx()

static ScriptDisp* ScriptDisp_from_IDispatchEx ( IDispatchEx *  iface)
inlinestatic

Definition at line 572 of file vbdisp.c.

573 {
574  return CONTAINING_RECORD(iface, ScriptDisp, IDispatchEx_iface);
575 }
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

Referenced by ScriptDisp_AddRef(), ScriptDisp_DeleteMemberByDispID(), ScriptDisp_DeleteMemberByName(), ScriptDisp_GetDispID(), ScriptDisp_GetIDsOfNames(), ScriptDisp_GetMemberName(), ScriptDisp_GetMemberProperties(), ScriptDisp_GetNameSpaceParent(), ScriptDisp_GetNextDispID(), ScriptDisp_GetTypeInfo(), ScriptDisp_GetTypeInfoCount(), ScriptDisp_Invoke(), ScriptDisp_InvokeEx(), ScriptDisp_QueryInterface(), and ScriptDisp_Release().

◆ ScriptDisp_GetDispID()

static HRESULT WINAPI ScriptDisp_GetDispID ( IDispatchEx *  iface,
BSTR  bstrName,
DWORD  grfdex,
DISPID pid 
)
static

Definition at line 675 of file vbdisp.c.

676 {
680  function_t *func;
681 
682  TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid);
683 
684  if(!This->ctx)
685  return E_UNEXPECTED;
686 
687  for(ident = This->ident_map; ident < This->ident_map+This->ident_map_cnt; ident++) {
688  if(!wcsicmp(ident->name, bstrName)) {
689  *pid = ident_to_id(This, ident);
690  return S_OK;
691  }
692  }
693 
694  for(var = This->ctx->global_vars; var; var = var->next) {
695  if(!wcsicmp(var->name, bstrName)) {
696  ident = add_ident(This, var->name);
697  if(!ident)
698  return E_OUTOFMEMORY;
699 
700  ident->is_var = TRUE;
701  ident->u.var = var;
702  *pid = ident_to_id(This, ident);
703  return S_OK;
704  }
705  }
706 
707  for(func = This->ctx->global_funcs; func; func = func->next) {
708  if(!wcsicmp(func->name, bstrName)) {
709  ident = add_ident(This, func->name);
710  if(!ident)
711  return E_OUTOFMEMORY;
712 
713  ident->is_var = FALSE;
714  ident->u.func = func;
715  *pid = ident_to_id(This, ident);
716  return S_OK;
717  }
718  }
719 
720  *pid = -1;
721  return DISP_E_UNKNOWNNAME;
722 }
const char * var
Definition: shader.c:5666
GLenum func
Definition: glext.h:6028
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
static DISPID ident_to_id(ScriptDisp *This, ident_map_t *ident)
Definition: vbdisp.c:538
#define TRUE
Definition: types.h:120
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
_In_ ULONG _In_ ULONG_PTR ident
Definition: winddi.h:3993
#define TRACE(s)
Definition: solgame.cpp:4
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define wcsicmp
Definition: string.h:1152
#define S_OK
Definition: intsafe.h:59
static ident_map_t * add_ident(ScriptDisp *This, const WCHAR *name)
Definition: vbdisp.c:548
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ ScriptDisp_GetIDsOfNames()

static HRESULT WINAPI ScriptDisp_GetIDsOfNames ( IDispatchEx *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 644 of file vbdisp.c.

646 {
648  UINT i;
649  HRESULT hres;
650 
651  TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
652  lcid, rgDispId);
653 
654  for(i=0; i < cNames; i++) {
655  hres = IDispatchEx_GetDispID(&This->IDispatchEx_iface, rgszNames[i], 0, rgDispId+i);
656  if(FAILED(hres))
657  return hres;
658  }
659 
660  return S_OK;
661 }
REFIID riid
Definition: precomp.h:44
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
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define S_OK
Definition: intsafe.h:59
unsigned int UINT
Definition: ndis.h:50

◆ ScriptDisp_GetMemberName()

static HRESULT WINAPI ScriptDisp_GetMemberName ( IDispatchEx *  iface,
DISPID  id,
BSTR pbstrName 
)
static

Definition at line 780 of file vbdisp.c.

781 {
783  FIXME("(%p)->(%x %p)\n", This, id, pbstrName);
784  return E_NOTIMPL;
785 }
#define FIXME(fmt,...)
Definition: debug.h:110
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ScriptDisp_GetMemberProperties()

static HRESULT WINAPI ScriptDisp_GetMemberProperties ( IDispatchEx *  iface,
DISPID  id,
DWORD  grfdexFetch,
DWORD pgrfdex 
)
static

Definition at line 773 of file vbdisp.c.

774 {
776  FIXME("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex);
777  return E_NOTIMPL;
778 }
#define FIXME(fmt,...)
Definition: debug.h:110
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ScriptDisp_GetNameSpaceParent()

static HRESULT WINAPI ScriptDisp_GetNameSpaceParent ( IDispatchEx *  iface,
IUnknown **  ppunk 
)
static

Definition at line 794 of file vbdisp.c.

795 {
797  FIXME("(%p)->(%p)\n", This, ppunk);
798  return E_NOTIMPL;
799 }
#define FIXME(fmt,...)
Definition: debug.h:110
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ScriptDisp_GetNextDispID()

static HRESULT WINAPI ScriptDisp_GetNextDispID ( IDispatchEx *  iface,
DWORD  grfdex,
DISPID  id,
DISPID pid 
)
static

Definition at line 787 of file vbdisp.c.

788 {
790  FIXME("(%p)->(%x %x %p)\n", This, grfdex, id, pid);
791  return E_NOTIMPL;
792 }
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
#define FIXME(fmt,...)
Definition: debug.h:110
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ScriptDisp_GetTypeInfo()

static HRESULT WINAPI ScriptDisp_GetTypeInfo ( IDispatchEx *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 636 of file vbdisp.c.

638 {
640  FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
641  return E_NOTIMPL;
642 }
#define FIXME(fmt,...)
Definition: debug.h:110
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ScriptDisp_GetTypeInfoCount()

static HRESULT WINAPI ScriptDisp_GetTypeInfoCount ( IDispatchEx *  iface,
UINT pctinfo 
)
static

Definition at line 626 of file vbdisp.c.

627 {
629 
630  TRACE("(%p)->(%p)\n", This, pctinfo);
631 
632  *pctinfo = 1;
633  return S_OK;
634 }
#define TRACE(s)
Definition: solgame.cpp:4
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define S_OK
Definition: intsafe.h:59

◆ ScriptDisp_Invoke()

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

Definition at line 663 of file vbdisp.c.

665 {
667 
668  TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
669  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
670 
671  return IDispatchEx_InvokeEx(&This->IDispatchEx_iface, dispIdMember, lcid, wFlags,
672  pDispParams, pVarResult, pExcepInfo, NULL);
673 }
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534

◆ ScriptDisp_InvokeEx()

static HRESULT WINAPI ScriptDisp_InvokeEx ( IDispatchEx *  iface,
DISPID  id,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pdp,
VARIANT pvarRes,
EXCEPINFO *  pei,
IServiceProvider pspCaller 
)
static

Definition at line 724 of file vbdisp.c.

726 {
729  HRESULT hres;
730 
731  TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
732 
733  ident = id_to_ident(This, id);
734  if(!ident)
735  return DISP_E_MEMBERNOTFOUND;
736 
737  if(ident->is_var) {
738  if(ident->u.var->is_const) {
739  FIXME("const not supported\n");
740  return E_NOTIMPL;
741  }
742 
743  return invoke_variant_prop(This->ctx, &ident->u.var->v, wFlags, pdp, pvarRes);
744  }
745 
746  switch(wFlags) {
747  case DISPATCH_METHOD:
749  hres = exec_script(This->ctx, TRUE, ident->u.func, NULL, pdp, pvarRes);
750  break;
751  default:
752  FIXME("Unsupported flags %x\n", wFlags);
753  hres = E_NOTIMPL;
754  }
755 
756  return hres;
757 }
static HRESULT invoke_variant_prop(script_ctx_t *ctx, VARIANT *v, WORD flags, DISPPARAMS *dp, VARIANT *res)
Definition: vbdisp.c:116
#define TRUE
Definition: types.h:120
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
_In_ ULONG _In_ ULONG_PTR ident
Definition: winddi.h:3993
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534
HRESULT exec_script(HTMLInnerWindow *, const WCHAR *, const WCHAR *, VARIANT *) DECLSPEC_HIDDEN
Definition: script.c:1245
#define E_NOTIMPL
Definition: ddrawi.h:99
static ident_map_t * id_to_ident(ScriptDisp *This, DISPID id)
Definition: vbdisp.c:543

◆ ScriptDisp_QueryInterface()

static HRESULT WINAPI ScriptDisp_QueryInterface ( IDispatchEx *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 577 of file vbdisp.c.

578 {
580 
581  if(IsEqualGUID(&IID_IUnknown, riid)) {
582  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
583  *ppv = &This->IDispatchEx_iface;
584  }else if(IsEqualGUID(&IID_IDispatch, riid)) {
585  TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
586  *ppv = &This->IDispatchEx_iface;
587  }else if(IsEqualGUID(&IID_IDispatchEx, riid)) {
588  TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv);
589  *ppv = &This->IDispatchEx_iface;
590  }else {
591  WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
592  *ppv = NULL;
593  return E_NOINTERFACE;
594  }
595 
596  IUnknown_AddRef((IUnknown*)*ppv);
597  return S_OK;
598 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ ScriptDisp_Release()

static ULONG WINAPI ScriptDisp_Release ( IDispatchEx *  iface)
static

Definition at line 610 of file vbdisp.c.

611 {
614 
615  TRACE("(%p) ref=%d\n", This, ref);
616 
617  if(!ref) {
618  assert(!This->ctx);
619  heap_free(This->ident_map);
620  heap_free(This);
621  }
622 
623  return ref;
624 }
#define assert(x)
Definition: debug.h:53
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
Definition: vbdisp.c:572
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ unsafe_impl_from_IDispatch()

static vbdisp_t* unsafe_impl_from_IDispatch ( IDispatch iface)
inlinestatic

Definition at line 463 of file vbdisp.c.

464 {
465  return iface->lpVtbl == (IDispatchVtbl*)&DispatchExVtbl
466  ? CONTAINING_RECORD((IDispatchEx *)iface, vbdisp_t, IDispatchEx_iface)
467  : NULL;
468 }
smooth NULL
Definition: ftsmooth.c:416
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
struct _vbdisp_t vbdisp_t
Definition: vbscript.h:61
static IDispatchExVtbl DispatchExVtbl
Definition: vbdisp.c:445

Referenced by disp_call(), disp_get_id(), and disp_propput().

◆ vbdisp_get_id()

HRESULT vbdisp_get_id ( vbdisp_t This,
BSTR  name,
vbdisp_invoke_type_t  invoke_type,
BOOL  search_private,
DISPID id 
)

Definition at line 59 of file vbdisp.c.

60 {
61  unsigned i;
62 
63  if(get_func_id(This, name, invoke_type, search_private, id))
64  return S_OK;
65 
66  for(i=0; i < This->desc->prop_cnt; i++) {
67  if(!search_private && !This->desc->props[i].is_public)
68  continue;
69 
70  if(!wcsicmp(This->desc->props[i].name, name)) {
71  *id = i + This->desc->func_cnt;
72  return S_OK;
73  }
74  }
75 
76  *id = -1;
77  return DISP_E_UNKNOWNNAME;
78 }
#define DISP_E_UNKNOWNNAME
Definition: winerror.h:2515
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 BOOL get_func_id(vbdisp_t *This, const WCHAR *name, vbdisp_invoke_type_t invoke_type, BOOL search_private, DISPID *id)
Definition: vbdisp.c:34
#define wcsicmp
Definition: string.h:1152
#define S_OK
Definition: intsafe.h:59
Definition: name.c:38

Referenced by disp_get_id(), and DispatchEx_GetDispID().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( vbscript  )

Variable Documentation

◆ DispatchExVtbl

IDispatchExVtbl DispatchExVtbl
static
Initial value:
= {
}
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
Definition: vbdisp.c:276
static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
Definition: vbdisp.c:424
static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
Definition: vbdisp.c:299
static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
Definition: vbdisp.c:366
static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
Definition: vbdisp.c:326
static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: vbdisp.c:336
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
Definition: vbdisp.c:417
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
Definition: vbdisp.c:403
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
Definition: vbdisp.c:438
static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: vbdisp.c:344
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
Definition: vbdisp.c:431
static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
Definition: vbdisp.c:309
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
Definition: vbdisp.c:410
static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: vbdisp.c:354
static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: vbdisp.c:387

Definition at line 445 of file vbdisp.c.

Referenced by create_vbdisp(), and unsafe_impl_from_IDispatch().

◆ ScriptDispVtbl

IDispatchExVtbl ScriptDispVtbl
static
Initial value:
= {
}
static HRESULT WINAPI ScriptDisp_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: vbdisp.c:636
static ULONG WINAPI ScriptDisp_Release(IDispatchEx *iface)
Definition: vbdisp.c:610
static HRESULT WINAPI ScriptDisp_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
Definition: vbdisp.c:794
static HRESULT WINAPI ScriptDisp_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
Definition: vbdisp.c:773
static HRESULT WINAPI ScriptDisp_Invoke(IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: vbdisp.c:663
static HRESULT WINAPI ScriptDisp_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
Definition: vbdisp.c:780
static HRESULT WINAPI ScriptDisp_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
Definition: vbdisp.c:759
static HRESULT WINAPI ScriptDisp_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
Definition: vbdisp.c:626
static ULONG WINAPI ScriptDisp_AddRef(IDispatchEx *iface)
Definition: vbdisp.c:600
static HRESULT WINAPI ScriptDisp_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: vbdisp.c:644
static HRESULT WINAPI ScriptDisp_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
Definition: vbdisp.c:787
static HRESULT WINAPI ScriptDisp_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
Definition: vbdisp.c:675
static HRESULT WINAPI ScriptDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
Definition: vbdisp.c:724
static HRESULT WINAPI ScriptDisp_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
Definition: vbdisp.c:577
static HRESULT WINAPI ScriptDisp_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
Definition: vbdisp.c:766

Definition at line 801 of file vbdisp.c.

Referenced by create_script_disp().