winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
996 discussions
Start a n
N
ew thread
Jacek Caban : vbscript: Added class functions parser implementation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: ee67bc7a37dc8133ea5711e013825382730b9087 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee67bc7a37dc8133ea5711e01…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 19:04:43 2011 +0200 vbscript: Added class functions parser implementation. --- dlls/vbscript/parse.h | 1 + dlls/vbscript/parser.y | 24 ++++++++++++++++++++++++ dlls/vbscript/tests/lang.vbs | 12 ++++++++++++ 3 files changed, 37 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h index 3a4d03b..94ba0cf 100644 --- a/dlls/vbscript/parse.h +++ b/dlls/vbscript/parse.h @@ -148,6 +148,7 @@ typedef struct _function_statement_t { typedef struct _class_decl_t { const WCHAR *name; + function_decl_t *funcs; struct _class_decl_t *next; } class_decl_t; diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index e310a70..3eacf2f 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -59,7 +59,9 @@ static dim_decl_t *new_dim_decl(parser_ctx_t*,const WCHAR*,dim_decl_t*); static elseif_decl_t *new_elseif_decl(parser_ctx_t*,expression_t*,statement_t*); static function_decl_t *new_function_decl(parser_ctx_t*,const WCHAR*,function_type_t,unsigned,arg_decl_t*,statement_t*); static arg_decl_t *new_argument_decl(parser_ctx_t*,const WCHAR*,BOOL); + static class_decl_t *new_class_decl(parser_ctx_t*); +static class_decl_t *add_class_function(parser_ctx_t*,class_decl_t*,function_decl_t*); #define STORAGE_IS_PRIVATE 1 #define STORAGE_IS_DEFAULT 2 @@ -289,6 +291,7 @@ ClassDeclaration ClassBody : /* empty */ { $$ = new_class_decl(ctx); } + | FunctionDecl tNL ClassBody { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; } FunctionDecl : Storage_opt tSUB tIdentifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tSUB @@ -599,6 +602,7 @@ static function_decl_t *new_function_decl(parser_ctx_t *ctx, const WCHAR *name, decl->is_public = !(storage_flags & STORAGE_IS_PRIVATE); decl->args = arg_decl; decl->body = body; + decl->next = NULL; return decl; } @@ -622,10 +626,30 @@ static class_decl_t *new_class_decl(parser_ctx_t *ctx) if(!class_decl) return NULL; + class_decl->funcs = NULL; class_decl->next = NULL; return class_decl; } +static class_decl_t *add_class_function(parser_ctx_t *ctx, class_decl_t *class_decl, function_decl_t *decl) +{ + function_decl_t *iter; + + for(iter = class_decl->funcs; iter; iter = iter->next) { + if(!strcmpiW(iter->name, decl->name)) { + if(decl->type == FUNC_SUB || decl->type == FUNC_FUNCTION) { + FIXME("Redefinition of %s::%s\n", debugstr_w(class_decl->name), debugstr_w(decl->name)); + ctx->hres = E_FAIL; + return NULL; + } + } + } + + decl->next = class_decl->funcs; + class_decl->funcs = decl; + return class_decl; +} + void *parser_alloc(parser_ctx_t *ctx, size_t size) { void *ret; diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index bc64f85..2f78403 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -386,4 +386,16 @@ Call ok(getVT(obj) = "VT_DISPATCH*", "getVT(obj) = " & getVT(obj)) Class EmptyClass End Class +Class TestClass + Public Function publicFunction() + publicFunction = 4 + End Function + + Public Sub publicSub + End Sub + + Public Sub privateSub + End Sub +End Class + reportSuccess()
1
0
0
0
Jacek Caban : vbscript: Added function storage specifiers support.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 3862cdab4ffb12aab79309df331fbe40a962ba37 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3862cdab4ffb12aab79309df3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:20:05 2011 +0200 vbscript: Added function storage specifiers support. --- dlls/vbscript/compile.c | 1 + dlls/vbscript/parse.h | 1 + dlls/vbscript/parser.y | 35 ++++++++++++++++++++++++++++------- dlls/vbscript/tests/lang.vbs | 16 ++++++++++++++++ dlls/vbscript/vbscript.h | 1 + 5 files changed, 47 insertions(+), 7 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 698ea8d..5c7f7e3 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -760,6 +760,7 @@ static HRESULT create_function(compile_ctx_t *ctx, function_decl_t *decl, functi func->var_cnt = 0; func->code_ctx = ctx->code; func->type = decl->type; + func->is_public = decl->is_public; func->arg_cnt = 0; if(decl->args) { diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h index ac0f310..3a4d03b 100644 --- a/dlls/vbscript/parse.h +++ b/dlls/vbscript/parse.h @@ -135,6 +135,7 @@ typedef struct _arg_decl_t { typedef struct _function_decl_t { const WCHAR *name; function_type_t type; + BOOL is_public; arg_decl_t *args; statement_t *body; struct _function_decl_t *next; diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 50a4bf1..e310a70 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -31,7 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(vbscript); static int parser_error(const char*); - static void parse_complete(parser_ctx_t*,BOOL); +static void parse_complete(parser_ctx_t*,BOOL); static void source_add_statement(parser_ctx_t*,statement_t*); static void source_add_class(parser_ctx_t*,class_decl_t*); @@ -57,10 +57,13 @@ static statement_t *new_function_statement(parser_ctx_t*,function_decl_t*); static dim_decl_t *new_dim_decl(parser_ctx_t*,const WCHAR*,dim_decl_t*); static elseif_decl_t *new_elseif_decl(parser_ctx_t*,expression_t*,statement_t*); -static function_decl_t *new_function_decl(parser_ctx_t*,const WCHAR*,function_type_t,arg_decl_t*,statement_t*); +static function_decl_t *new_function_decl(parser_ctx_t*,const WCHAR*,function_type_t,unsigned,arg_decl_t*,statement_t*); static arg_decl_t *new_argument_decl(parser_ctx_t*,const WCHAR*,BOOL); static class_decl_t *new_class_decl(parser_ctx_t*); +#define STORAGE_IS_PRIVATE 1 +#define STORAGE_IS_DEFAULT 2 + #define CHECK_ERROR if(((parser_ctx_t*)ctx)->hres != S_OK) YYABORT %} @@ -78,6 +81,7 @@ static class_decl_t *new_class_decl(parser_ctx_t*); function_decl_t *func_decl; arg_decl_t *arg_decl; class_decl_t *class_decl; + unsigned uint; LONG lng; BOOL bool; double dbl; @@ -111,6 +115,7 @@ static class_decl_t *new_class_decl(parser_ctx_t*); %type <func_decl> FunctionDecl %type <elseif> ElseIfs_opt ElseIfs ElseIf %type <class_decl> ClassDeclaration ClassBody +%type <uint> Storage Storage_opt %type <dim_decl> DimDeclList %% @@ -286,10 +291,19 @@ ClassBody : /* empty */ { $$ = new_class_decl(ctx); } FunctionDecl - : /* Storage_opt */ tSUB tIdentifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tSUB - { $$ = new_function_decl(ctx, $2, FUNC_SUB, $3, $5); CHECK_ERROR; } - | /* Storage_opt */ tFUNCTION tIdentifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tFUNCTION - { $$ = new_function_decl(ctx, $2, FUNC_FUNCTION, $3, $5); CHECK_ERROR; } + : Storage_opt tSUB tIdentifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tSUB + { $$ = new_function_decl(ctx, $3, FUNC_SUB, $1, $4, $6); CHECK_ERROR; } + | Storage_opt tFUNCTION tIdentifier ArgumentsDecl_opt tNL StatementsNl_opt tEND tFUNCTION + { $$ = new_function_decl(ctx, $3, FUNC_FUNCTION, $1, $4, $6); CHECK_ERROR; } + +Storage_opt + : /* empty*/ { $$ = 0; } + | Storage { $$ = $1; } + +Storage + : tPUBLIC tDEFAULT { $$ = STORAGE_IS_DEFAULT; } + | tPUBLIC { $$ = 0; } + | tPRIVATE { $$ = STORAGE_IS_PRIVATE; } ArgumentsDecl_opt : EmptyBrackets_opt { $$ = NULL; } @@ -566,16 +580,23 @@ static arg_decl_t *new_argument_decl(parser_ctx_t *ctx, const WCHAR *name, BOOL } static function_decl_t *new_function_decl(parser_ctx_t *ctx, const WCHAR *name, function_type_t type, - arg_decl_t *arg_decl, statement_t *body) + unsigned storage_flags, arg_decl_t *arg_decl, statement_t *body) { function_decl_t *decl; + if(storage_flags & STORAGE_IS_DEFAULT) { + FIXME("Function declared as default property\n"); + ctx->hres = E_FAIL; + return NULL; + } + decl = parser_alloc(ctx, sizeof(*decl)); if(!decl) return NULL; decl->name = name; decl->type = type; + decl->is_public = !(storage_flags & STORAGE_IS_PRIVATE); decl->args = arg_decl; decl->body = body; return decl; diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index a94b2cd..bc64f85 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -271,6 +271,14 @@ y = true Call TestSubLocalVal Call ok(x, "global x is not true?") +Public Sub TestPublicSub +End Sub +Call TestPublicSub + +Private Sub TestPrivateSub +End Sub +Call TestPrivateSub + if false then Function testfunc x = true @@ -360,6 +368,14 @@ x = false ok SetVal(x, true), "SetVal returned false?" Call ok(x, "x is not set to true by SetVal?") +Public Function TestPublicFunc +End Function +Call TestPublicFunc + +Private Function TestPrivateFunc +End Function +Call TestPrivateFunc + set x = testObj Call ok(getVT(x) = "VT_DISPATCH*", "getVT(x=testObj) = " & getVT(x)) diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 8defcd6..014e480 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -204,6 +204,7 @@ typedef struct { struct _function_t { function_type_t type; const WCHAR *name; + BOOL is_public; arg_desc_t *args; unsigned arg_cnt; var_desc_t *vars;
1
0
0
0
Jacek Caban : vbscript: Added obj member call test.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: dfc74ac04a7417cf21bfecedd60be3fe838ca572 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dfc74ac04a7417cf21bfecedd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:19:52 2011 +0200 vbscript: Added obj member call test. --- dlls/vbscript/tests/run.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index 4281b16..fa6eec1 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -60,6 +60,8 @@ DEFINE_EXPECT(global_success_d); DEFINE_EXPECT(global_success_i); DEFINE_EXPECT(global_vbvar_d); DEFINE_EXPECT(global_vbvar_i); +DEFINE_EXPECT(testobj_propget_d); +DEFINE_EXPECT(testobj_propget_i); DEFINE_EXPECT(testobj_propput_d); DEFINE_EXPECT(testobj_propput_i); @@ -72,6 +74,7 @@ DEFINE_EXPECT(testobj_propput_i); #define DISPID_GLOBAL_TESTOBJ 1006 #define DISPID_GLOBAL_ISNULLDISP 1007 +#define DISPID_TESTOBJ_PROPGET 2000 #define DISPID_TESTOBJ_PROPPUT 2001 static const WCHAR testW[] = {'t','e','s','t',0}; @@ -234,6 +237,12 @@ static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown static HRESULT WINAPI testObj_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) { + if(!strcmp_wa(bstrName, "propget")) { + CHECK_EXPECT(testobj_propget_d); + test_grfdex(grfdex, fdexNameCaseInsensitive); + *pid = DISPID_TESTOBJ_PROPGET; + return S_OK; + } if(!strcmp_wa(bstrName, "propput")) { CHECK_EXPECT(testobj_propput_d); test_grfdex(grfdex, fdexNameCaseInsensitive); @@ -249,6 +258,21 @@ static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) { switch(id) { + case DISPID_TESTOBJ_PROPGET: + CHECK_EXPECT(testobj_propget_i); + + ok(wFlags == (DISPATCH_PROPERTYGET|DISPATCH_METHOD), "wFlags = %x\n", wFlags); + ok(pdp != NULL, "pdp == NULL\n"); + ok(!pdp->rgvarg, "rgvarg == NULL\n"); + ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); + ok(!pdp->cArgs, "cArgs = %d\n", pdp->cArgs); + ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); + ok(pvarRes != NULL, "pvarRes == NULL\n"); + ok(pei != NULL, "pei == NULL\n"); + + V_VT(pvarRes) = VT_I2; + V_I2(pvarRes) = 10; + return S_OK; case DISPID_TESTOBJ_PROPPUT: CHECK_EXPECT(testobj_propput_i); @@ -802,6 +826,12 @@ static void run_tests(void) CHECK_CALLED(global_vbvar_d); CHECK_CALLED(global_vbvar_i); + SET_EXPECT(testobj_propget_d); + SET_EXPECT(testobj_propget_i); + parse_script_a("dim x\nx = testObj.propget"); + CHECK_CALLED(testobj_propget_d); + CHECK_CALLED(testobj_propget_i); + SET_EXPECT(testobj_propput_d); SET_EXPECT(testobj_propput_i); parse_script_a("testObj.propput = 1");
1
0
0
0
Jacek Caban : vbscript: Added object member call implementation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: a6ee830fd249ee96176e62c5261ed6cc70107b55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6ee830fd249ee96176e62c52…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:19:41 2011 +0200 vbscript: Added object member call implementation. --- dlls/vbscript/compile.c | 7 ++++- dlls/vbscript/interp.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/vbscript/vbscript.h | 2 + 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 36bf04c..698ea8d 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -318,8 +318,11 @@ static HRESULT compile_member_expression(compile_ctx_t *ctx, member_expression_t return hres; if(expr->obj_expr) { - FIXME("obj_expr not implemented\n"); - hres = E_NOTIMPL; + hres = compile_expression(ctx, expr->obj_expr); + if(FAILED(hres)) + return hres; + + hres = push_instr_bstr_uint(ctx, ret_val ? OP_mcall : OP_mcallv, expr->identifier, arg_cnt); }else { hres = push_instr_bstr_uint(ctx, ret_val ? OP_icall : OP_icallv, expr->identifier, arg_cnt); } diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index f8e0011..beacfe9 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -327,6 +327,57 @@ static HRESULT interp_icallv(exec_ctx_t *ctx) return do_icall(ctx, NULL); } +static HRESULT do_mcall(exec_ctx_t *ctx, VARIANT *res) +{ + const BSTR identifier = ctx->instr->arg1.bstr; + const unsigned arg_cnt = ctx->instr->arg2.uint; + IDispatch *obj; + DISPPARAMS dp; + DISPID id; + HRESULT hres; + + hres = stack_pop_disp(ctx, &obj); + if(FAILED(hres)) + return hres; + + if(!obj) { + FIXME("NULL obj\n"); + return E_FAIL; + } + + vbstack_to_dp(ctx, arg_cnt, &dp); + + hres = disp_get_id(obj, identifier, &id); + if(SUCCEEDED(hres)) + hres = disp_call(ctx->script, obj, id, &dp, res); + IDispatch_Release(obj); + if(FAILED(hres)) + return hres; + + stack_popn(ctx, arg_cnt); + return S_OK; +} + +static HRESULT interp_mcall(exec_ctx_t *ctx) +{ + VARIANT res; + HRESULT hres; + + TRACE("\n"); + + hres = do_mcall(ctx, &res); + if(FAILED(hres)) + return hres; + + return stack_push(ctx, &res); +} + +static HRESULT interp_mcallv(exec_ctx_t *ctx) +{ + FIXME("\n"); + return E_NOTIMPL; +} + static HRESULT assign_ident(exec_ctx_t *ctx, BSTR name, VARIANT *val, BOOL own_val) { ref_t ref; diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 4c2d977..8defcd6 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -146,6 +146,8 @@ typedef enum { X(jmp, 0, ARG_ADDR, 0) \ X(jmp_false, 0, ARG_ADDR, 0) \ X(long, 1, ARG_INT, 0) \ + X(mcall, 1, ARG_BSTR, ARG_UINT) \ + X(mcallv, 1, ARG_BSTR, ARG_UINT) \ X(mod, 1, 0, 0) \ X(mul, 1, 0, 0) \ X(neg, 1, 0, 0) \
1
0
0
0
Jacek Caban : vbscript: Added interp_nothing implementation and tests.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 9848d6be2ed2e3be4e7ce3ac07c5b96586614591 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9848d6be2ed2e3be4e7ce3ac0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:19:19 2011 +0200 vbscript: Added interp_nothing implementation and tests. --- dlls/vbscript/interp.c | 9 +++++++-- dlls/vbscript/tests/lang.vbs | 5 +++++ dlls/vbscript/tests/run.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 4094ac1..f8e0011 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -599,8 +599,13 @@ static HRESULT interp_null(exec_ctx_t *ctx) static HRESULT interp_nothing(exec_ctx_t *ctx) { - FIXME("\n"); - return E_NOTIMPL; + VARIANT v; + + TRACE("\n"); + + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = NULL; + return stack_push(ctx, &v); } static HRESULT interp_not(exec_ctx_t *ctx) diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index c89009b..a94b2cd 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -71,9 +71,14 @@ Call ok(getVT(1 & 100000) = "VT_BSTR", "getVT(1 & 100000) is not VT_BSTR") Call ok(getVT(-empty) = "VT_I2", "getVT(-empty) = " & getVT(-empty)) Call ok(getVT(-null) = "VT_NULL", "getVT(-null) = " & getVT(-null)) Call ok(getVT(y) = "VT_EMPTY*", "getVT(y) = " & getVT(y)) +Call ok(getVT(nothing) = "VT_DISPATCH", "getVT(nothing) = " & getVT(nothing)) +set x = nothing +Call ok(getVT(x) = "VT_DISPATCH*", "getVT(x=nothing) = " & getVT(x)) x = true Call ok(getVT(x) = "VT_BOOL*", "getVT(x) = " & getVT(x)) +Call ok(isNullDisp(nothing), "nothing is not nulldisp?") + x = "xx" Call ok("ab" & "cd" = "abcd", """ab"" & ""cd"" <> ""abcd""") Call ok("ab " & null = "ab ", """ab"" & null = " & ("ab " & null)) diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index aa2e3f1..4281b16 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -70,6 +70,7 @@ DEFINE_EXPECT(testobj_propput_i); #define DISPID_GLOBAL_ISENGLOC 1004 #define DISPID_GLOBAL_VBVAR 1005 #define DISPID_GLOBAL_TESTOBJ 1006 +#define DISPID_GLOBAL_ISNULLDISP 1007 #define DISPID_TESTOBJ_PROPPUT 2001 @@ -329,6 +330,12 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD *pid = DISPID_GLOBAL_VBVAR; return S_OK; } + if(!strcmp_wa(bstrName, "isNullDisp")) { + test_grfdex(grfdex, fdexNameCaseInsensitive); + *pid = DISPID_GLOBAL_ISNULLDISP; + return S_OK; + } + if(strict_dispid_check && strcmp_wa(bstrName, "x")) ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex); @@ -459,6 +466,28 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, V_VT(pvarRes) = VT_DISPATCH; V_DISPATCH(pvarRes) = (IDispatch*)&testObj; return S_OK; + + case DISPID_GLOBAL_ISNULLDISP: { + VARIANT *v; + + ok(wFlags == (INVOKE_FUNC|INVOKE_PROPERTYGET), "wFlags = %x\n", wFlags); + ok(pdp != NULL, "pdp == NULL\n"); + ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); + ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); + ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); + ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); + ok(pvarRes != NULL, "pvarRes == NULL\n"); + ok(pei != NULL, "pei == NULL\n"); + + v = pdp->rgvarg; + if(V_VT(v) == (VT_VARIANT|VT_BYREF)) + v = V_VARIANTREF(v); + + ok(V_VT(v) == VT_DISPATCH, "V_VT(psp->rgvargs) = %d\n", V_VT(pdp->rgvarg)); + V_VT(pvarRes) = VT_BOOL; + V_BOOL(pvarRes) = V_DISPATCH(v) ? VARIANT_FALSE : VARIANT_TRUE; + return S_OK; + } } ok(0, "unexpected call %d\n", id);
1
0
0
0
Jacek Caban : vbscript: Added nothing literal parser/ compiler implementation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 8864c8dbae7db66662e7f022a91d84d11a65dcf7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8864c8dbae7db66662e7f022a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:18:56 2011 +0200 vbscript: Added nothing literal parser/compiler implementation. --- dlls/vbscript/compile.c | 2 ++ dlls/vbscript/interp.c | 6 ++++++ dlls/vbscript/parse.h | 1 + dlls/vbscript/parser.y | 1 + dlls/vbscript/vbscript.h | 1 + 5 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index b9e05bd9..36bf04c 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -394,6 +394,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr) return push_instr_str(ctx, OP_new, ((string_expression_t*)expr)->value); case EXPR_NOT: return compile_unary_expression(ctx, (unary_expression_t*)expr, OP_not); + case EXPR_NOTHING: + return push_instr(ctx, OP_nothing) != -1 ? S_OK : E_OUTOFMEMORY; case EXPR_NULL: return push_instr(ctx, OP_null) != -1 ? S_OK : E_OUTOFMEMORY; case EXPR_OR: diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index b413243..4094ac1 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -597,6 +597,12 @@ static HRESULT interp_null(exec_ctx_t *ctx) return stack_push(ctx, &v); } +static HRESULT interp_nothing(exec_ctx_t *ctx) +{ + FIXME("\n"); + return E_NOTIMPL; +} + static HRESULT interp_not(exec_ctx_t *ctx) { variant_val_t val; diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h index 21f0d60..ac0f310 100644 --- a/dlls/vbscript/parse.h +++ b/dlls/vbscript/parse.h @@ -36,6 +36,7 @@ typedef enum { EXPR_NEQUAL, EXPR_NEW, EXPR_NOT, + EXPR_NOTHING, EXPR_NULL, EXPR_OR, EXPR_STRING, diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 48a5ab4..50a4bf1 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -274,6 +274,7 @@ LiteralExpression | tDouble { $$ = new_double_expression(ctx, $1); CHECK_ERROR; } | tEMPTY { $$ = new_expression(ctx, EXPR_EMPTY, 0); CHECK_ERROR; } | tNULL { $$ = new_expression(ctx, EXPR_NULL, 0); CHECK_ERROR; } + | tNOTHING { $$ = new_expression(ctx, EXPR_NOTHING, 0); CHECK_ERROR; } PrimaryExpression : '(' Expression ')' { $$ = $2; } diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index dabf52b..4c2d977 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -152,6 +152,7 @@ typedef enum { X(nequal, 1, 0, 0) \ X(new, 1, ARG_STR, 0) \ X(not, 1, 0, 0) \ + X(nothing, 1, 0, 0) \ X(null, 1, 0, 0) \ X(or, 1, 0, 0) \ X(ret, 0, 0, 0) \
1
0
0
0
Jacek Caban : vbscript: Store class_desc_t in vbdisp_t.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: efc59d1b19cff5b5e5ab184b7717defcf968c9a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=efc59d1b19cff5b5e5ab184b7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:18:43 2011 +0200 vbscript: Store class_desc_t in vbdisp_t. --- dlls/vbscript/interp.c | 2 +- dlls/vbscript/vbdisp.c | 6 ++++-- dlls/vbscript/vbscript.h | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 04ed81d..b413243 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -463,7 +463,7 @@ static HRESULT interp_new(exec_ctx_t *ctx) return E_FAIL; } - hres = create_vbdisp(&obj); + hres = create_vbdisp(class_desc, &obj); if(FAILED(hres)) return hres; diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index 73006be..f1a323d 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -184,7 +184,7 @@ static IDispatchExVtbl DispatchExVtbl = { DispatchEx_GetNameSpaceParent }; -HRESULT create_vbdisp(vbdisp_t **ret) +HRESULT create_vbdisp(const class_desc_t *desc, vbdisp_t **ret) { vbdisp_t *vbdisp; @@ -194,6 +194,7 @@ HRESULT create_vbdisp(vbdisp_t **ret) vbdisp->IDispatchEx_iface.lpVtbl = &DispatchExVtbl; vbdisp->ref = 1; + vbdisp->desc = desc; *ret = vbdisp; return S_OK; @@ -201,7 +202,8 @@ HRESULT create_vbdisp(vbdisp_t **ret) HRESULT init_global(script_ctx_t *ctx) { - return create_vbdisp(&ctx->script_obj); + ctx->script_desc.ctx = ctx; + return create_vbdisp(&ctx->script_desc, &ctx->script_obj); } HRESULT disp_get_id(IDispatch *disp, BSTR name, DISPID *id) diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 9e77714..dabf52b 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -65,6 +65,8 @@ typedef struct { IDispatchEx IDispatchEx_iface; LONG ref; + + const class_desc_t *desc; } vbdisp_t; typedef enum { @@ -74,7 +76,7 @@ typedef enum { VBDISP_ANY } vbdisp_invoke_type_t; -HRESULT create_vbdisp(vbdisp_t**); +HRESULT create_vbdisp(const class_desc_t*,vbdisp_t**); HRESULT disp_get_id(IDispatch*,BSTR,DISPID*); HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,DISPPARAMS*,VARIANT*); HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,VARIANT*); @@ -101,6 +103,7 @@ struct _script_ctx_t { IDispatch *host_global; + class_desc_t script_desc; vbdisp_t *script_obj; dynamic_var_t *global_vars;
1
0
0
0
Jacek Caban : vbscript: Added interp_new implementation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: fb57bc21b8471d47764793a4b06cd32592b25f5e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb57bc21b8471d47764793a4b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:18:29 2011 +0200 vbscript: Added interp_new implementation. --- dlls/vbscript/interp.c | 25 +++++++++++++++++++++++-- dlls/vbscript/tests/lang.vbs | 4 ++++ dlls/vbscript/vbdisp.c | 2 +- dlls/vbscript/vbscript.h | 1 + 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index dd4f4ff..04ed81d 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -447,8 +447,29 @@ static HRESULT interp_set_member(exec_ctx_t *ctx) static HRESULT interp_new(exec_ctx_t *ctx) { const WCHAR *arg = ctx->instr->arg1.bstr; - FIXME("%s\n", debugstr_w(arg)); - return E_NOTIMPL; + class_desc_t *class_desc; + vbdisp_t *obj; + VARIANT v; + HRESULT hres; + + TRACE("%s\n", debugstr_w(arg)); + + for(class_desc = ctx->script->classes; class_desc; class_desc = class_desc->next) { + if(!strcmpiW(class_desc->name, arg)) + break; + } + if(!class_desc) { + FIXME("Class %s not found\n", debugstr_w(arg)); + return E_FAIL; + } + + hres = create_vbdisp(&obj); + if(FAILED(hres)) + return hres; + + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = (IDispatch*)&obj->IDispatchEx_iface; + return stack_push(ctx, &v); } static HRESULT interp_jmp(exec_ctx_t *ctx) diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 01c7072..c89009b 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -358,6 +358,10 @@ 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)) +Dim obj +Set obj = New EmptyClass +Call ok(getVT(obj) = "VT_DISPATCH*", "getVT(obj) = " & getVT(obj)) + Class EmptyClass End Class diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index 9cfdab2..73006be 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -184,7 +184,7 @@ static IDispatchExVtbl DispatchExVtbl = { DispatchEx_GetNameSpaceParent }; -static HRESULT create_vbdisp(vbdisp_t **ret) +HRESULT create_vbdisp(vbdisp_t **ret) { vbdisp_t *vbdisp; diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 3e3af5b..9e77714 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -74,6 +74,7 @@ typedef enum { VBDISP_ANY } vbdisp_invoke_type_t; +HRESULT create_vbdisp(vbdisp_t**); HRESULT disp_get_id(IDispatch*,BSTR,DISPID*); HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,DISPPARAMS*,VARIANT*); HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,VARIANT*);
1
0
0
0
Jacek Caban : vbscript: Added new expression parser/compiler implemetation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: 408a1bf6820cd43b5929a0ee93755103bdcdf095 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=408a1bf6820cd43b5929a0ee9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Sep 15 14:18:12 2011 +0200 vbscript: Added new expression parser/compiler implemetation. --- dlls/vbscript/compile.c | 2 ++ dlls/vbscript/interp.c | 7 +++++++ dlls/vbscript/parse.h | 1 + dlls/vbscript/parser.y | 14 ++++++++++++++ dlls/vbscript/vbscript.h | 1 + 5 files changed, 25 insertions(+), 0 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index d1720cf..b9e05bd9 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -390,6 +390,8 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr) return compile_unary_expression(ctx, (unary_expression_t*)expr, OP_neg); case EXPR_NEQUAL: return compile_binary_expression(ctx, (binary_expression_t*)expr, OP_nequal); + case EXPR_NEW: + return push_instr_str(ctx, OP_new, ((string_expression_t*)expr)->value); case EXPR_NOT: return compile_unary_expression(ctx, (unary_expression_t*)expr, OP_not); case EXPR_NULL: diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 705992c..dd4f4ff 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -444,6 +444,13 @@ static HRESULT interp_set_member(exec_ctx_t *ctx) return E_NOTIMPL; } +static HRESULT interp_new(exec_ctx_t *ctx) +{ + const WCHAR *arg = ctx->instr->arg1.bstr; + FIXME("%s\n", debugstr_w(arg)); + return E_NOTIMPL; +} + static HRESULT interp_jmp(exec_ctx_t *ctx) { const unsigned arg = ctx->instr->arg1.uint; diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h index 76f8775..21f0d60 100644 --- a/dlls/vbscript/parse.h +++ b/dlls/vbscript/parse.h @@ -34,6 +34,7 @@ typedef enum { EXPR_MUL, EXPR_NEG, EXPR_NEQUAL, + EXPR_NEW, EXPR_NOT, EXPR_NULL, EXPR_OR, diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 2e0140e..48a5ab4 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -43,6 +43,7 @@ static expression_t *new_long_expression(parser_ctx_t*,expression_type_t,LONG); static expression_t *new_double_expression(parser_ctx_t*,double); static expression_t *new_unary_expression(parser_ctx_t*,expression_type_t,expression_t*); static expression_t *new_binary_expression(parser_ctx_t*,expression_type_t,expression_t*,expression_t*); +static expression_t *new_new_expression(parser_ctx_t*,const WCHAR*); static member_expression_t *new_member_expression(parser_ctx_t*,expression_t*,const WCHAR*); @@ -256,6 +257,7 @@ ExpExpression UnaryExpression : LiteralExpression { $$ = $1; } | CallExpression { $$ = $1; } + | tNEW tIdentifier { $$ = new_new_expression(ctx, $2); CHECK_ERROR; } | '-' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_NEG, $2); CHECK_ERROR; } CallExpression @@ -430,6 +432,18 @@ static member_expression_t *new_member_expression(parser_ctx_t *ctx, expression_ return expr; } +static expression_t *new_new_expression(parser_ctx_t *ctx, const WCHAR *identifier) +{ + string_expression_t *expr; + + expr = new_expression(ctx, EXPR_NEW, sizeof(*expr)); + if(!expr) + return NULL; + + expr->value = identifier; + return &expr->expr; +} + static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size) { statement_t *stat; diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 9655978..3e3af5b 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -146,6 +146,7 @@ typedef enum { X(mul, 1, 0, 0) \ X(neg, 1, 0, 0) \ X(nequal, 1, 0, 0) \ + X(new, 1, ARG_STR, 0) \ X(not, 1, 0, 0) \ X(null, 1, 0, 0) \ X(or, 1, 0, 0) \
1
0
0
0
Jacek Caban : vbscript: Added interp_set_ident implementation.
by Alexandre Julliard
15 Sep '11
15 Sep '11
Module: wine Branch: master Commit: f683832ac1603aa904256f3eca730e45d35601fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f683832ac1603aa904256f3ec…
Author: Jacek Caban <jacek(a)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
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
100
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Results per page:
10
25
50
100
200