vbscript: Added interp_set_ident implementation.

This commit is contained in:
Jacek Caban 2011-09-15 14:17:51 +02:00 committed by Alexandre Julliard
parent b3a6217ed3
commit f683832ac1
2 changed files with 16 additions and 2 deletions

View File

@ -388,8 +388,19 @@ static HRESULT interp_assign_ident(exec_ctx_t *ctx)
static HRESULT interp_set_ident(exec_ctx_t *ctx) static HRESULT interp_set_ident(exec_ctx_t *ctx)
{ {
const BSTR arg = ctx->instr->arg1.bstr; const BSTR arg = ctx->instr->arg1.bstr;
FIXME("%s\n", debugstr_w(arg)); IDispatch *disp;
return E_NOTIMPL; VARIANT v;
HRESULT hres;
TRACE("%s\n", debugstr_w(arg));
hres = stack_pop_disp(ctx, &disp);
if(FAILED(hres))
return hres;
V_VT(&v) = VT_DISPATCH;
V_DISPATCH(&v) = disp;
return assign_ident(ctx, ctx->instr->arg1.bstr, &v, TRUE);
} }
static HRESULT interp_assign_member(exec_ctx_t *ctx) static HRESULT interp_assign_member(exec_ctx_t *ctx)

View File

@ -355,6 +355,9 @@ x = false
ok SetVal(x, true), "SetVal returned false?" ok SetVal(x, true), "SetVal returned false?"
Call ok(x, "x is not set to true by SetVal?") Call ok(x, "x is not set to true by SetVal?")
set x = testObj
Call ok(getVT(x) = "VT_DISPATCH*", "getVT(x=testObj) = " & getVT(x))
Class EmptyClass Class EmptyClass
End Class End Class