27#define FDEX_VERSION_MASK 0xf0000000
31 return id <
This->desc->func_cnt;
40 if(!search_private && !
This->desc->funcs[
i].is_public)
42 if(!
i && !
This->desc->funcs[0].name)
45 if(!
This->desc->funcs[
i].entries[invoke_type]
46 || (!search_private && !
This->desc->funcs[
i].entries[invoke_type]->is_public))
66 for(
i=0;
i <
This->desc->prop_cnt;
i++) {
67 if(!search_private && !
This->desc->props[
i].is_public)
71 *
id =
i +
This->desc->func_cnt;
84 for(
i=0;
i < dp->cNamedArgs;
i++) {
85 if(dp->rgdispidNamedArgs[
i] == DISPID_PROPERTYPUT)
88 if(
i == dp->cNamedArgs) {
89 WARN(
"no value to set\n");
124 WARN(
"called with arguments\n");
142 FIXME(
"Arguments not supported\n");
188 FIXME(
"no invoke/getter\n");
203 FIXME(
"arguments not implemented\n");
211 dp.rgvarg = &put_val;
214 FIXME(
"no letter/setter\n");
229 if(
id >=
This->desc->prop_cnt +
This->desc->func_cnt)
240 if(
This->terminator_ran)
244 if(!
This->desc->class_terminate_id)
260 for(
i=0;
i <
This->desc->array_cnt;
i++) {
261 if(
This->arrays[
i]) {
267 for(
i=0;
i <
This->desc->prop_cnt;
i++)
282 *
ppv = &
This->IDispatchEx_iface;
285 *
ppv = &
This->IDispatchEx_iface;
288 *
ppv = &
This->IDispatchEx_iface;
340 FIXME(
"(%p)->(%u %u %p)\n",
This, iTInfo, lcid, ppTInfo);
356 VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
UINT *puArgErr)
361 lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
363 return IDispatchEx_InvokeEx(&
This->IDispatchEx_iface, dispIdMember, lcid,
wFlags, pDispParams, pVarResult, pExcepInfo,
NULL);
372 grfdex &= ~FDEX_VERSION_MASK;
379 if(grfdex & ~(fdexNameEnsure|fdexNameCaseInsensitive|fdexNameCaseSensitive)) {
380 FIXME(
"unsupported flags %x\n", grfdex);
392 TRACE(
"(%p)->(%x %x %x %p %p %p %p)\n",
This,
id, lcid,
wFlags, pdp, pvarRes, pei, pspCaller);
420 FIXME(
"(%p)->(%x %x %p)\n",
This,
id, grfdexFetch, pgrfdex);
427 FIXME(
"(%p)->(%x %p)\n",
This,
id, pbstrName);
485 if(
desc->array_cnt) {
486 vbdisp->
arrays = heap_alloc_zero(
desc->array_cnt *
sizeof(*vbdisp->
arrays));
490 for(
i=0;
i <
desc->array_cnt;
i++) {
491 if(!
desc->array_descs[
i].dim_cnt)
502 for(
i=0,
j=0;
i <
desc->prop_cnt;
i++) {
503 if(
desc->props[
i].is_array) {
545 return 0 <
id &&
id <=
This->ident_map_cnt ?
This->ident_map+
id-1 :
NULL;
552 if(!
This->ident_map_size) {
556 This->ident_map_size = 4;
557 }
else if(
This->ident_map_cnt ==
This->ident_map_size) {
563 This->ident_map = new_map;
564 This->ident_map_size *= 2;
583 *
ppv = &
This->IDispatchEx_iface;
586 *
ppv = &
This->IDispatchEx_iface;
589 *
ppv = &
This->IDispatchEx_iface;
640 FIXME(
"(%p)->(%u %u %p)\n",
This, iTInfo, lcid, ppTInfo);
654 for(
i=0;
i < cNames;
i++) {
655 hres = IDispatchEx_GetDispID(&
This->IDispatchEx_iface, rgszNames[
i], 0, rgDispId+
i);
669 lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
671 return IDispatchEx_InvokeEx(&
This->IDispatchEx_iface, dispIdMember, lcid,
wFlags,
672 pDispParams, pVarResult, pExcepInfo,
NULL);
731 TRACE(
"(%p)->(%x %x %x %p %p %p %p)\n",
This,
id, lcid,
wFlags, pdp, pvarRes, pei, pspCaller);
738 if(
ident->u.var->is_const) {
739 FIXME(
"const not supported\n");
776 FIXME(
"(%p)->(%x %x %p)\n",
This,
id, grfdexFetch, pgrfdex);
783 FIXME(
"(%p)->(%x %p)\n",
This,
id, pbstrName);
864 hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (
void**)&dispex);
866 TRACE(
"using IDispatch\n");
867 return IDispatch_GetIDsOfNames(disp, &
IID_NULL, &
name, 1, 0,
id);
870 hres = IDispatchEx_GetDispID(dispex,
name, fdexNameCaseInsensitive,
id);
871 IDispatchEx_Release(dispex);
875#define RPC_E_SERVER_UNAVAILABLE 0x800706ba
946 memset(&ei, 0,
sizeof(ei));
954 hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (
void**)&dispex);
958 TRACE(
"using IDispatch\n");
962 hres = IDispatchEx_InvokeEx(dispex,
id,
ctx->lcid,
flags, dp, retv, &ei,
NULL );
963 IDispatchEx_Release(dispex);
969 DISPPARAMS dp = {
NULL};
986 hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (
void**)&dispex);
989 IDispatchEx_Release(dispex);
993 TRACE(
"using IDispatch\n");
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
#define VBSE_PATH_NOT_FOUND
#define VBSE_INVALID_DLL_FUNCTION_NAME
#define VBSE_OBJECT_VARIABLE_NOT_SET
#define VBSE_ILLEGAL_FUNC_CALL
#define VBSE_ARRAY_LOCKED
#define VBSE_PATH_FILE_ACCESS
#define VBSE_INVALID_TYPELIB_VARIABLE
#define VBSE_OLE_NO_PROP_OR_METHOD
#define VBSE_FUNC_ARITY_MISMATCH
#define VBSE_LOCALE_SETTING_NOT_SUPPORTED
#define VBSE_OLE_FILE_NOT_FOUND
#define VBSE_ACTION_NOT_SUPPORTED
#define VBSE_OUT_OF_BOUNDS
#define VBSE_FILE_NOT_FOUND
#define VBSE_PARAMETER_NOT_OPTIONAL
#define VBSE_CANT_CREATE_TMP_FILE
#define VBSE_OUT_OF_MEMORY
#define VBSE_TOO_MANY_FILES
#define VBSE_TYPE_MISMATCH
#define VBSE_OLE_NOT_SUPPORTED
#define VBSE_NAMED_ARGS_NOT_SUPPORTED
#define VBSE_NAMED_PARAM_NOT_FOUND
#define VBSE_FILE_ALREADY_EXISTS
#define VBSE_CANT_CREATE_OBJECT
#define VBSE_SERVER_NOT_FOUND
#define VBSE_PERMISSION_DENIED
GLenum const GLfloat * params
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
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
HRESULT exec_script(HTMLInnerWindow *, const WCHAR *, const WCHAR *, VARIANT *) DECLSPEC_HIDDEN
static const WCHAR desc[]
static const char * debugstr_variant(const VARIANT *var)
static IDispatch * script_disp
static VARIANTARG static DISPID
#define DISPATCH_PROPERTYPUT
#define DISPATCH_PROPERTYGET
#define DISPATCH_PROPERTYPUTREF
#define IsEqualGUID(rguid1, rguid2)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
union _ident_map_t::@592 u
IDispatchEx IDispatchEx_iface
const class_desc_t * desc
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
HRESULT WINAPI VariantCopyInd(VARIANT *pvargDest, VARIANTARG *pvargSrc)
static HRESULT WINAPI ScriptDisp_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
static ULONG WINAPI ScriptDisp_AddRef(IDispatchEx *iface)
static DISPID ident_to_id(ScriptDisp *This, ident_map_t *ident)
static ULONG WINAPI ScriptDisp_Release(IDispatchEx *iface)
static vbdisp_t * unsafe_impl_from_IDispatch(IDispatch *iface)
static BOOL get_func_id(vbdisp_t *This, const WCHAR *name, vbdisp_invoke_type_t invoke_type, BOOL search_private, DISPID *id)
static HRESULT WINAPI ScriptDisp_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
HRESULT create_vbdisp(const class_desc_t *desc, vbdisp_t **ret)
HRESULT get_disp_value(script_ctx_t *ctx, IDispatch *disp, VARIANT *v)
static BOOL is_func_id(vbdisp_t *This, DISPID id)
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_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
static HRESULT WINAPI ScriptDisp_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, DISPPARAMS *dp)
static HRESULT WINAPI ScriptDisp_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_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
HRESULT vbdisp_get_id(vbdisp_t *This, BSTR name, vbdisp_invoke_type_t invoke_type, BOOL search_private, DISPID *id)
static void clean_props(vbdisp_t *This)
static HRESULT WINAPI ScriptDisp_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
static HRESULT WINAPI ScriptDisp_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
HRESULT disp_get_id(IDispatch *disp, BSTR name, vbdisp_invoke_type_t invoke_type, BOOL search_private, DISPID *id)
HRESULT create_script_disp(script_ctx_t *ctx, ScriptDisp **ret)
static BOOL run_terminator(vbdisp_t *This)
static ident_map_t * id_to_ident(ScriptDisp *This, DISPID id)
static HRESULT WINAPI ScriptDisp_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
static ident_map_t * add_ident(ScriptDisp *This, const WCHAR *name)
static ScriptDisp * ScriptDisp_from_IDispatchEx(IDispatchEx *iface)
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
static HRESULT invoke_variant_prop(script_ctx_t *ctx, VARIANT *v, WORD flags, DISPPARAMS *dp, VARIANT *res)
static vbdisp_t * impl_from_IDispatchEx(IDispatchEx *iface)
static HRESULT WINAPI ScriptDisp_Invoke(IDispatchEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
#define RPC_E_SERVER_UNAVAILABLE
static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
static HRESULT WINAPI ScriptDisp_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
static IDispatchExVtbl ScriptDispVtbl
static HRESULT WINAPI ScriptDisp_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
static HRESULT get_propput_arg(script_ctx_t *ctx, const DISPPARAMS *dp, WORD flags, VARIANT *v, BOOL *is_owned)
static HRESULT WINAPI ScriptDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp, VARIANT *retv)
static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
void collect_objects(script_ctx_t *ctx)
static HRESULT WINAPI ScriptDisp_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
static HRESULT WINAPI ScriptDisp_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static IDispatchExVtbl DispatchExVtbl
static HRESULT invoke_vbdisp(vbdisp_t *This, DISPID id, DWORD flags, BOOL extern_caller, DISPPARAMS *params, VARIANT *res)
static unsigned arg_cnt(const DISPPARAMS *dp)
struct _vbdisp_t vbdisp_t
#define MAKE_VBSERROR(code)
static const WCHAR props[]
_In_ DWORD _Out_ _In_ WORD wFlags
_In_ ULONG _In_ ULONG_PTR ident
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
#define REGDB_E_CLASSNOTREG
#define STG_E_SHAREVIOLATION
#define TYPE_E_CANTCREATETMPFILE
#define DISP_E_PARAMNOTFOUND
#define DISP_E_NONAMEDARGS
#define DISP_E_ARRAYISLOCKED
#define STG_E_PATHNOTFOUND
#define STG_E_TOOMANYOPENFILES
#define TYPE_E_DLLFUNCTIONNOTFOUND
#define STG_E_LOCKVIOLATION
#define STG_E_INVALIDNAME
#define HRESULT_FACILITY(hr)
#define DISP_E_UNKNOWNINTERFACE
#define DISP_E_BADVARTYPE
#define DISP_E_BADPARAMCOUNT
#define STG_E_DISKISWRITEPROTECTED
#define STG_E_FILEALREADYEXISTS
#define TYPE_E_TYPEMISMATCH
#define STG_E_FILENOTFOUND
#define DISP_E_NOTACOLLECTION
#define DISP_E_MEMBERNOTFOUND
#define STG_E_ACCESSDENIED
#define MK_E_CANTOPENFILE
#define DISP_E_UNKNOWNLCID
#define CO_E_SERVER_EXEC_FAILURE
#define MK_E_INVALIDEXTENSION
#define DISP_E_TYPEMISMATCH
#define STG_E_NOMOREFILES
#define DISP_E_PARAMNOTOPTIONAL
#define TYPE_E_OUTOFBOUNDS
#define DISP_E_UNKNOWNNAME
#define STG_E_INSUFFICIENTMEMORY