Module: wine Branch: master Commit: 62a21545726ab580128b664a6f257838dbafe5d4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=62a21545726ab580128b664a6f...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Sep 9 14:49:00 2011 +0200
vbscript: Added interp_icall implementation.
---
dlls/vbscript/interp.c | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index d88439a..ec56fa9 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -168,13 +168,7 @@ static void vbstack_to_dp(exec_ctx_t *ctx, unsigned arg_cnt, DISPPARAMS *dp) } }
-static HRESULT interp_icall(exec_ctx_t *ctx) -{ - FIXME("\n"); - return E_NOTIMPL; -} - -static HRESULT interp_icallv(exec_ctx_t *ctx) +static HRESULT do_icall(exec_ctx_t *ctx, VARIANT *res) { BSTR identifier = ctx->instr->arg1.bstr; const unsigned arg_cnt = ctx->instr->arg2.uint; @@ -182,8 +176,6 @@ static HRESULT interp_icallv(exec_ctx_t *ctx) DISPPARAMS dp; HRESULT hres;
- TRACE("\n"); - hres = lookup_identifier(ctx, identifier, &ref); if(FAILED(hres)) return hres; @@ -192,7 +184,7 @@ static HRESULT interp_icallv(exec_ctx_t *ctx)
switch(ref.type) { case REF_DISP: - hres = disp_call(ctx->script, ref.u.d.disp, ref.u.d.id, &dp, NULL); + hres = disp_call(ctx->script, ref.u.d.disp, ref.u.d.id, &dp, res); if(FAILED(hres)) return hres; break; @@ -205,6 +197,26 @@ static HRESULT interp_icallv(exec_ctx_t *ctx) return S_OK; }
+static HRESULT interp_icall(exec_ctx_t *ctx) +{ + VARIANT v; + HRESULT hres; + + TRACE("\n"); + + hres = do_icall(ctx, &v); + if(FAILED(hres)) + return hres; + + return stack_push(ctx, &v); +} + +static HRESULT interp_icallv(exec_ctx_t *ctx) +{ + TRACE("\n"); + return do_icall(ctx, NULL); +} + static HRESULT interp_ret(exec_ctx_t *ctx) { TRACE("\n");