Commit 95d040e9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Added support for SCRIPTITEM_ISVISIBLE named items.

parent 347cf1d3
......@@ -149,6 +149,29 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
return S_OK;
}
}
if((item->flags & SCRIPTITEM_ISVISIBLE) && !strcmpiW(item->name, name)) {
if(!item->disp) {
IUnknown *unk;
hres = IActiveScriptSite_GetItemInfo(ctx->script->site, name, SCRIPTINFO_IUNKNOWN, &unk, NULL);
if(FAILED(hres)) {
WARN("GetItemInfo failed: %08x\n", hres);
continue;
}
hres = IUnknown_QueryInterface(unk, &IID_IDispatch, (void**)&item->disp);
IUnknown_Release(unk);
if(FAILED(hres)) {
WARN("object does not implement IDispatch\n");
continue;
}
}
ref->type = REF_OBJ;
ref->u.obj = item->disp;
return S_OK;
}
}
if(!strcmpiW(name, errW)) {
......
......@@ -620,4 +620,6 @@ Call ok(not (x is Nothing), "x is 1")
Call ok(Nothing is Nothing, "Nothing is not Nothing")
Call ok(x is obj and true, "x is obj and true is false")
Call ok(getVT(test) = "VT_DISPATCH", "getVT(test) = " & getVT(test))
reportSuccess()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment