jscript: Added support for VT_I2 in disp_call.

This commit is contained in:
Jacek Caban 2012-05-01 15:04:51 +02:00 committed by Alexandre Julliard
parent b6a1912392
commit da125450da
1 changed files with 10 additions and 5 deletions

View File

@ -1056,7 +1056,10 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, DIS
if(retv)
V_VT(retv) = VT_EMPTY;
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
if(FAILED(hres)) {
if(SUCCEEDED(hres)) {
hres = IDispatchEx_InvokeEx(dispex, id, ctx->lcid, flags, dp, retv, &ei->ei, &ctx->jscaller->IServiceProvider_iface);
IDispatchEx_Release(dispex);
}else {
UINT err = 0;
if(flags == DISPATCH_CONSTRUCT) {
@ -1065,13 +1068,15 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, DIS
}
TRACE("using IDispatch\n");
return IDispatch_Invoke(disp, id, &IID_NULL, ctx->lcid, flags, dp, retv, &ei->ei, &err);
hres = IDispatch_Invoke(disp, id, &IID_NULL, ctx->lcid, flags, dp, retv, &ei->ei, &err);
}
hres = IDispatchEx_InvokeEx(dispex, id, ctx->lcid, flags, dp, retv, &ei->ei, &ctx->jscaller->IServiceProvider_iface);
IDispatchEx_Release(dispex);
if(FAILED(hres))
return hres;
return hres;
if(retv)
ensure_retval_type(retv);
return S_OK;
}
HRESULT jsdisp_propput_name(jsdisp_t *obj, const WCHAR *name, VARIANT *val, jsexcept_t *ei)