Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2083935c
Commit
2083935c
authored
Sep 12, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added interp_assign_ident implementation.
parent
3c85122e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
2 deletions
+59
-2
interp.c
dlls/vbscript/interp.c
+36
-2
vbdisp.c
dlls/vbscript/vbdisp.c
+22
-0
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/interp.c
View file @
2083935c
...
...
@@ -217,10 +217,44 @@ static HRESULT interp_icallv(exec_ctx_t *ctx)
return
do_icall
(
ctx
,
NULL
);
}
static
HRESULT
assign_ident
(
exec_ctx_t
*
ctx
,
BSTR
name
,
VARIANT
*
val
,
BOOL
own_val
)
{
ref_t
ref
;
HRESULT
hres
;
hres
=
lookup_identifier
(
ctx
,
name
,
&
ref
);
if
(
FAILED
(
hres
))
return
hres
;
switch
(
ref
.
type
)
{
case
REF_DISP
:
hres
=
disp_propput
(
ctx
->
script
,
ref
.
u
.
d
.
disp
,
ref
.
u
.
d
.
id
,
val
);
if
(
own_val
)
VariantClear
(
val
);
break
;
case
REF_NONE
:
FIXME
(
"%s not found
\n
"
,
debugstr_w
(
name
));
if
(
own_val
)
VariantClear
(
val
);
return
DISP_E_UNKNOWNNAME
;
}
return
hres
;
}
static
HRESULT
interp_assign_ident
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
const
BSTR
arg
=
ctx
->
instr
->
arg1
.
bstr
;
variant_val_t
v
;
HRESULT
hres
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
arg
));
hres
=
stack_pop_val
(
ctx
,
&
v
);
if
(
FAILED
(
hres
))
return
hres
;
return
assign_ident
(
ctx
,
arg
,
v
.
v
,
v
.
owned
);
}
static
HRESULT
interp_ret
(
exec_ctx_t
*
ctx
)
...
...
dlls/vbscript/vbdisp.c
View file @
2083935c
...
...
@@ -246,3 +246,25 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp,
IDispatchEx_Release
(
dispex
);
return
hres
;
}
HRESULT
disp_propput
(
script_ctx_t
*
ctx
,
IDispatch
*
disp
,
DISPID
id
,
VARIANT
*
val
)
{
DISPID
propput_dispid
=
DISPID_PROPERTYPUT
;
DISPPARAMS
dp
=
{
val
,
&
propput_dispid
,
1
,
1
};
IDispatchEx
*
dispex
;
EXCEPINFO
ei
=
{
0
};
HRESULT
hres
;
hres
=
IDispatch_QueryInterface
(
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IDispatchEx_InvokeEx
(
dispex
,
id
,
ctx
->
lcid
,
DISPATCH_PROPERTYPUT
,
&
dp
,
NULL
,
&
ei
,
NULL
/* FIXME! */
);
IDispatchEx_Release
(
dispex
);
}
else
{
ULONG
err
=
0
;
TRACE
(
"using IDispatch
\n
"
);
hres
=
IDispatch_Invoke
(
disp
,
id
,
&
IID_NULL
,
ctx
->
lcid
,
DISPATCH_PROPERTYPUT
,
&
dp
,
NULL
,
&
ei
,
&
err
);
}
return
hres
;
}
dlls/vbscript/vbscript.h
View file @
2083935c
...
...
@@ -63,6 +63,7 @@ typedef struct {
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
*
);
struct
_script_ctx_t
{
IActiveScriptSite
*
site
;
...
...
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