Commit 571b09ce authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Pass DISPATCH_PROPERTYPUTREF flag to InvokeEx when apropriate.

parent 128f79ee
...@@ -709,7 +709,7 @@ static HRESULT interp_mcallv(exec_ctx_t *ctx) ...@@ -709,7 +709,7 @@ static HRESULT interp_mcallv(exec_ctx_t *ctx)
return do_mcall(ctx, NULL); 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; ref_t ref;
HRESULT hres; HRESULT hres;
...@@ -762,7 +762,7 @@ static HRESULT assign_ident(exec_ctx_t *ctx, BSTR name, DISPPARAMS *dp) ...@@ -762,7 +762,7 @@ static HRESULT assign_ident(exec_ctx_t *ctx, BSTR name, DISPPARAMS *dp)
break; break;
} }
case REF_DISP: 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; break;
case REF_FUNC: case REF_FUNC:
FIXME("functions not implemented\n"); FIXME("functions not implemented\n");
...@@ -805,7 +805,7 @@ static HRESULT interp_assign_ident(exec_ctx_t *ctx) ...@@ -805,7 +805,7 @@ static HRESULT interp_assign_ident(exec_ctx_t *ctx)
return hres; return hres;
vbstack_to_dp(ctx, arg_cnt, TRUE, &dp); 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)) if(FAILED(hres))
return hres; return hres;
...@@ -832,7 +832,7 @@ static HRESULT interp_set_ident(exec_ctx_t *ctx) ...@@ -832,7 +832,7 @@ static HRESULT interp_set_ident(exec_ctx_t *ctx)
return hres; return hres;
vbstack_to_dp(ctx, 0, TRUE, &dp); 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)) if(FAILED(hres))
return hres; return hres;
...@@ -867,7 +867,7 @@ static HRESULT interp_assign_member(exec_ctx_t *ctx) ...@@ -867,7 +867,7 @@ static HRESULT interp_assign_member(exec_ctx_t *ctx)
hres = disp_get_id(obj, identifier, VBDISP_LET, FALSE, &id); hres = disp_get_id(obj, identifier, VBDISP_LET, FALSE, &id);
if(SUCCEEDED(hres)) { if(SUCCEEDED(hres)) {
vbstack_to_dp(ctx, arg_cnt, TRUE, &dp); 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)) if(FAILED(hres))
return hres; return hres;
...@@ -908,7 +908,7 @@ static HRESULT interp_set_member(exec_ctx_t *ctx) ...@@ -908,7 +908,7 @@ static HRESULT interp_set_member(exec_ctx_t *ctx)
hres = disp_get_id(obj, identifier, VBDISP_SET, FALSE, &id); hres = disp_get_id(obj, identifier, VBDISP_SET, FALSE, &id);
if(SUCCEEDED(hres)) { if(SUCCEEDED(hres)) {
vbstack_to_dp(ctx, arg_cnt, TRUE, &dp); 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)) if(FAILED(hres))
return hres; return hres;
...@@ -1176,7 +1176,7 @@ static HRESULT interp_enumnext(exec_ctx_t *ctx) ...@@ -1176,7 +1176,7 @@ static HRESULT interp_enumnext(exec_ctx_t *ctx)
return hres; return hres;
do_continue = hres == S_OK; do_continue = hres == S_OK;
hres = assign_ident(ctx, ident, &dp); hres = assign_ident(ctx, ident, DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF, &dp);
VariantClear(&v); VariantClear(&v);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
......
...@@ -1070,7 +1070,7 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp, ...@@ -1070,7 +1070,7 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp,
return hres; 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; IDispatchEx *dispex;
EXCEPINFO ei = {0}; EXCEPINFO ei = {0};
...@@ -1078,13 +1078,13 @@ HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS * ...@@ -1078,13 +1078,13 @@ HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex); hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
if(SUCCEEDED(hres)) { 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); IDispatchEx_Release(dispex);
}else { }else {
ULONG err = 0; ULONG err = 0;
TRACE("using IDispatch\n"); 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; return hres;
......
...@@ -148,7 +148,7 @@ HRESULT create_vbdisp(const class_desc_t*,vbdisp_t**) DECLSPEC_HIDDEN; ...@@ -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 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 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_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; void collect_objects(script_ctx_t*) DECLSPEC_HIDDEN;
HRESULT create_procedure_disp(script_ctx_t*,vbscode_t*,IDispatch**) DECLSPEC_HIDDEN; HRESULT create_procedure_disp(script_ctx_t*,vbscode_t*,IDispatch**) DECLSPEC_HIDDEN;
HRESULT create_script_disp(script_ctx_t*,ScriptDisp**) DECLSPEC_HIDDEN; HRESULT create_script_disp(script_ctx_t*,ScriptDisp**) DECLSPEC_HIDDEN;
......
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