diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 831a39d92e..16feabe483 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -710,8 +710,14 @@ static HRESULT interp_stop(exec_ctx_t *ctx) static HRESULT interp_me(exec_ctx_t *ctx) { - FIXME("\n"); - return E_NOTIMPL; + VARIANT v; + + TRACE("\n"); + + IDispatch_AddRef(ctx->this_obj); + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = ctx->this_obj; + return stack_push(ctx, &v); } static HRESULT interp_bool(exec_ctx_t *ctx) diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 2b33a2d0a9..922fc6ab2a 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -620,6 +620,16 @@ Call ok(not (x is Nothing), "x is 1") Call ok(Nothing is Nothing, "Nothing is not Nothing") Call ok(x is obj and true, "x is obj and true is false") +Class TestMe + Public Sub Test(MyMe) + Call ok(Me is MyMe, "Me is not MyMe") + End Sub +End Class + +Set obj = New TestMe +Call obj.test(obj) + Call ok(getVT(test) = "VT_DISPATCH", "getVT(test) = " & getVT(test)) +Call ok(Me is Test, "Me is not Test") reportSuccess()