vbscript: Added ScriptDisp::GetIDsOfNames implementation.
This commit is contained in:
parent
5a2b3e0de6
commit
ba611c0d3a
|
@ -350,13 +350,18 @@ static void parse_script(IActiveScriptParse *parse, const char *src)
|
|||
#define get_disp_id(a,b,c,d) _get_disp_id(__LINE__,a,b,c,d)
|
||||
static void _get_disp_id(unsigned line, IDispatchEx *dispex, const char *name, HRESULT exhres, DISPID *id)
|
||||
{
|
||||
DISPID id2;
|
||||
BSTR str;
|
||||
HRESULT hres;
|
||||
|
||||
str = a2bstr(name);
|
||||
hres = IDispatchEx_GetDispID(dispex, str, 0, id);
|
||||
SysFreeString(str);
|
||||
ok_(__FILE__,line)(hres == exhres, "GetDispID(%s) returned %08x, expected %08x\n", name, hres, exhres);
|
||||
|
||||
hres = IDispatchEx_GetIDsOfNames(dispex, &IID_NULL, &str, 1, 0, &id2);
|
||||
SysFreeString(str);
|
||||
ok_(__FILE__,line)(hres == exhres, "GetIDsOfNames(%s) returned %08x, expected %08x\n", name, hres, exhres);
|
||||
ok_(__FILE__,line)(*id == id2, "GetIDsOfNames(%s) id != id2\n", name);
|
||||
}
|
||||
|
||||
static void test_no_script_dispatch(IActiveScript *script)
|
||||
|
|
|
@ -682,13 +682,22 @@ static HRESULT WINAPI ScriptDisp_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LC
|
|||
}
|
||||
|
||||
static HRESULT WINAPI ScriptDisp_GetIDsOfNames(IDispatchEx *iface, REFIID riid,
|
||||
LPOLESTR *rgszNames, UINT cNames, LCID lcid,
|
||||
DISPID *rgDispId)
|
||||
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||
{
|
||||
ScriptDisp *This = ScriptDisp_from_IDispatchEx(iface);
|
||||
FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
||||
UINT i;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
||||
lcid, rgDispId);
|
||||
return E_NOTIMPL;
|
||||
|
||||
for(i=0; i < cNames; i++) {
|
||||
hres = IDispatchEx_GetDispID(&This->IDispatchEx_iface, rgszNames[i], 0, rgDispId+i);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ScriptDisp_Invoke(IDispatchEx *iface, DISPID dispIdMember,
|
||||
|
|
Loading…
Reference in New Issue