vbscript: Pass DISPATCH_PROPERTYPUTREF flag to InvokeEx when apropriate.

oldstable
Jacek Caban 2015-03-03 14:40:36 +01:00 committed by Alexandre Julliard
parent 128f79ee77
commit 571b09ce42
3 changed files with 11 additions and 11 deletions

View File

@ -709,7 +709,7 @@ static HRESULT interp_mcallv(exec_ctx_t *ctx)
return do_mcall(ctx, NULL);
}
static HRESULT assign_ident(exec_ctx_t *ctx, BSTR name, DISPPARAMS *dp)
static HRESULT assign_ident(exec_ctx_t *ctx, BSTR name, WORD flags, DISPPARAMS *dp)
{
ref_t ref;
HRESULT hres;
@ -762,7 +762,7 @@ static HRESULT assign_ident(exec_ctx_t *ctx, BSTR name, DISPPARAMS *dp)
break;
}
case REF_DISP:
hres = disp_propput(ctx->script, ref.u.d.disp, ref.u.d.id, dp);
hres = disp_propput(ctx->script, ref.u.d.disp, ref.u.d.id, flags, dp);
break;
case REF_FUNC:
FIXME("functions not implemented\n");
@ -805,7 +805,7 @@ static HRESULT interp_assign_ident(exec_ctx_t *ctx)
return hres;
vbstack_to_dp(ctx, arg_cnt, TRUE, &dp);
hres = assign_ident(ctx, arg, &dp);
hres = assign_ident(ctx, arg, DISPATCH_PROPERTYPUT, &dp);
if(FAILED(hres))
return hres;
@ -832,7 +832,7 @@ static HRESULT interp_set_ident(exec_ctx_t *ctx)
return hres;
vbstack_to_dp(ctx, 0, TRUE, &dp);
hres = assign_ident(ctx, ctx->instr->arg1.bstr, &dp);
hres = assign_ident(ctx, ctx->instr->arg1.bstr, DISPATCH_PROPERTYPUTREF, &dp);
if(FAILED(hres))
return hres;
@ -867,7 +867,7 @@ static HRESULT interp_assign_member(exec_ctx_t *ctx)
hres = disp_get_id(obj, identifier, VBDISP_LET, FALSE, &id);
if(SUCCEEDED(hres)) {
vbstack_to_dp(ctx, arg_cnt, TRUE, &dp);
hres = disp_propput(ctx->script, obj, id, &dp);
hres = disp_propput(ctx->script, obj, id, DISPATCH_PROPERTYPUT, &dp);
}
if(FAILED(hres))
return hres;
@ -908,7 +908,7 @@ static HRESULT interp_set_member(exec_ctx_t *ctx)
hres = disp_get_id(obj, identifier, VBDISP_SET, FALSE, &id);
if(SUCCEEDED(hres)) {
vbstack_to_dp(ctx, arg_cnt, TRUE, &dp);
hres = disp_propput(ctx->script, obj, id, &dp);
hres = disp_propput(ctx->script, obj, id, DISPATCH_PROPERTYPUTREF, &dp);
}
if(FAILED(hres))
return hres;
@ -1176,7 +1176,7 @@ static HRESULT interp_enumnext(exec_ctx_t *ctx)
return hres;
do_continue = hres == S_OK;
hres = assign_ident(ctx, ident, &dp);
hres = assign_ident(ctx, ident, DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF, &dp);
VariantClear(&v);
if(FAILED(hres))
return hres;

View File

@ -1070,7 +1070,7 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp,
return hres;
}
HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp)
HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, DISPPARAMS *dp)
{
IDispatchEx *dispex;
EXCEPINFO ei = {0};
@ -1078,13 +1078,13 @@ HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
if(SUCCEEDED(hres)) {
hres = IDispatchEx_InvokeEx(dispex, id, ctx->lcid, DISPATCH_PROPERTYPUT, dp, NULL, &ei, NULL /* FIXME! */);
hres = IDispatchEx_InvokeEx(dispex, id, ctx->lcid, flags, dp, NULL, &ei, NULL /* FIXME! */);
IDispatchEx_Release(dispex);
}else {
ULONG err = 0;
TRACE("using IDispatch\n");
hres = IDispatch_Invoke(disp, id, &IID_NULL, ctx->lcid, DISPATCH_PROPERTYPUT, dp, NULL, &ei, &err);
hres = IDispatch_Invoke(disp, id, &IID_NULL, ctx->lcid, flags, dp, NULL, &ei, &err);
}
return hres;

View File

@ -148,7 +148,7 @@ HRESULT create_vbdisp(const class_desc_t*,vbdisp_t**) DECLSPEC_HIDDEN;
HRESULT disp_get_id(IDispatch*,BSTR,vbdisp_invoke_type_t,BOOL,DISPID*) DECLSPEC_HIDDEN;
HRESULT vbdisp_get_id(vbdisp_t*,BSTR,vbdisp_invoke_type_t,BOOL,DISPID*) DECLSPEC_HIDDEN;
HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,DISPPARAMS*,VARIANT*) DECLSPEC_HIDDEN;
HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,DISPPARAMS*) DECLSPEC_HIDDEN;
HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,WORD,DISPPARAMS*) DECLSPEC_HIDDEN;
void collect_objects(script_ctx_t*) DECLSPEC_HIDDEN;
HRESULT create_procedure_disp(script_ctx_t*,vbscode_t*,IDispatch**) DECLSPEC_HIDDEN;
HRESULT create_script_disp(script_ctx_t*,ScriptDisp**) DECLSPEC_HIDDEN;