Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a6ee830f
Commit
a6ee830f
authored
Sep 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added object member call implementation.
parent
9848d6be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
2 deletions
+58
-2
compile.c
dlls/vbscript/compile.c
+5
-2
interp.c
dlls/vbscript/interp.c
+51
-0
vbscript.h
dlls/vbscript/vbscript.h
+2
-0
No files found.
dlls/vbscript/compile.c
View file @
a6ee830f
...
...
@@ -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
);
}
...
...
dlls/vbscript/interp.c
View file @
a6ee830f
...
...
@@ -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
;
...
...
dlls/vbscript/vbscript.h
View file @
a6ee830f
...
...
@@ -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) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment