From: Jacek Caban Subject: [PATCH 06/10] vbscript: Introduce get_builtin_id. Message-Id: Date: Thu, 17 Oct 2019 22:46:33 +0200 Signed-off-by: Jacek Caban --- dlls/vbscript/global.c | 5 +++++ dlls/vbscript/interp.c | 2 +- dlls/vbscript/vbscript.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index f0bdfc4efa..61caf3e31b 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 8649164764..4d2df0bf79 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 41e3b7983f..a0e2f99e16 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;