diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index f0bdfc4efa1..61caf3e31b7 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -39,6 +39,11 @@ const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY = static const WCHAR emptyW[] = {0}; static const WCHAR vbscriptW[] = {'V','B','S','c','r','i','p','t',0}; +HRESULT get_builtin_id(BuiltinDisp *disp, const WCHAR *name, DISPID *id) +{ + return ITypeInfo_GetIDsOfNames(disp->desc->typeinfo, (WCHAR**)&name, 1, id); +} + static IInternetHostSecurityManager *get_sec_mgr(script_ctx_t *ctx) { IInternetHostSecurityManager *secmgr; diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 86491647647..4d2df0bf79e 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -181,7 +181,7 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_ return S_OK; } - hres = vbdisp_get_id(ctx->script->global_obj, name, invoke_type, TRUE, &id); + hres = get_builtin_id(ctx->script->global_obj, name, &id); if(SUCCEEDED(hres)) { ref->type = REF_DISP; ref->u.d.disp = (IDispatch*)&ctx->script->global_obj->IDispatchEx_iface; diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 41e3b7983f3..a0e2f99e169 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -364,6 +364,7 @@ IDispatch *lookup_named_item(script_ctx_t*,const WCHAR*,unsigned) DECLSPEC_HIDDE void clear_ei(EXCEPINFO*) DECLSPEC_HIDDEN; HRESULT report_script_error(script_ctx_t*) DECLSPEC_HIDDEN; void detach_global_objects(script_ctx_t*) DECLSPEC_HIDDEN; +HRESULT get_builtin_id(BuiltinDisp*,const WCHAR*,DISPID*) DECLSPEC_HIDDEN; typedef struct { UINT16 len;