Jacek Caban : vbscript: Added interp_set_ident implementation.
Alexandre Julliard
julliard at winehq.org
Thu Sep 15 12:34:54 CDT 2011
Module: wine
Branch: master
Commit: f683832ac1603aa904256f3eca730e45d35601fa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f683832ac1603aa904256f3eca730e45d35601fa
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Sep 15 14:17:51 2011 +0200
vbscript: Added interp_set_ident implementation.
---
dlls/vbscript/interp.c | 15 +++++++++++++--
dlls/vbscript/tests/lang.vbs | 3 +++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c
index e61ed7a..705992c 100644
--- a/dlls/vbscript/interp.c
+++ b/dlls/vbscript/interp.c
@@ -388,8 +388,19 @@ static HRESULT interp_assign_ident(exec_ctx_t *ctx)
static HRESULT interp_set_ident(exec_ctx_t *ctx)
{
const BSTR arg = ctx->instr->arg1.bstr;
- FIXME("%s\n", debugstr_w(arg));
- return E_NOTIMPL;
+ IDispatch *disp;
+ 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)
diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs
index a338e76..01c7072 100644
--- a/dlls/vbscript/tests/lang.vbs
+++ b/dlls/vbscript/tests/lang.vbs
@@ -355,6 +355,9 @@ x = false
ok SetVal(x, true), "SetVal returned false?"
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
End Class
More information about the wine-cvs
mailing list