[PATCH 3/4] vbscript: Add support for the SCRIPTPROC_ISEXPRESSION flag in ParseProcedureText.

Gabriel Ivăncescu gabrielopcode at gmail.com
Mon Sep 16 08:05:07 CDT 2019


Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---

Most of it works already due to implementing it in the compiler itself as
an opcode. The only thing that's missing is to actually return the result.

 dlls/vbscript/vbdisp.c | 2 +-
 include/activscp.idl   | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c
index a907f40..0f6209f 100644
--- a/dlls/vbscript/vbdisp.c
+++ b/dlls/vbscript/vbdisp.c
@@ -626,7 +626,7 @@ static HRESULT Procedure_invoke(vbdisp_t *This, VARIANT *args, unsigned args_cnt
     TRACE("\n");
 
     IActiveScriptSite_OnEnterScript(ctx->site);
-    hres = exec_script(ctx, This->desc->value_func, NULL, NULL, NULL);
+    hres = exec_script(ctx, This->desc->value_func, NULL, NULL, res);
     IActiveScriptSite_OnLeaveScript(ctx->site);
 
     return hres;
diff --git a/include/activscp.idl b/include/activscp.idl
index 57179cf..97e7f5b 100644
--- a/include/activscp.idl
+++ b/include/activscp.idl
@@ -113,10 +113,12 @@ cpp_quote("                                        SCRIPTTEXT_ISVISIBLE | \\")
 cpp_quote("                                        SCRIPTTEXT_ISEXPRESSION | \\")
 cpp_quote("                                        SCRIPTTEXT_ISPERSISTENT | \\")
 cpp_quote("                                        SCRIPTTEXT_HOSTMANAGESSOURCE)")
+cpp_quote("#define SCRIPTPROC_ISEXPRESSION        0x00000020")
 cpp_quote("#define SCRIPTPROC_HOSTMANAGESSOURCE   0x00000080")
 cpp_quote("#define SCRIPTPROC_IMPLICIT_THIS       0x00000100")
 cpp_quote("#define SCRIPTPROC_IMPLICIT_PARENTS    0x00000200")
-cpp_quote("#define SCRIPTPROC_ALL_FLAGS           (SCRIPTPROC_HOSTMANAGESSOURCE | \\")
+cpp_quote("#define SCRIPTPROC_ALL_FLAGS           (SCRIPTPROC_ISEXPRESSION | \\")
+cpp_quote("                                        SCRIPTPROC_HOSTMANAGESSOURCE | \\")
 cpp_quote("                                        SCRIPTPROC_IMPLICIT_THIS | \\")
 cpp_quote("                                        SCRIPTPROC_IMPLICIT_PARENTS)")
 cpp_quote("#define SCRIPTINFO_IUNKNOWN            0x00000001")
-- 
2.21.0




More information about the wine-devel mailing list