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
0de7b95c
Commit
0de7b95c
authored
Mar 05, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added a helper for getting default IDispatch value.
parent
7561375e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
interp.c
dlls/vbscript/interp.c
+3
-7
vbdisp.c
dlls/vbscript/vbdisp.c
+7
-4
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/interp.c
View file @
0de7b95c
...
...
@@ -323,10 +323,9 @@ static HRESULT stack_pop_val(exec_ctx_t *ctx, variant_val_t *r)
stack_pop_deref
(
ctx
,
r
);
if
(
V_VT
(
r
->
v
)
==
VT_DISPATCH
)
{
DISPPARAMS
dp
=
{
0
};
HRESULT
hres
;
hres
=
disp_call
(
ctx
->
script
,
V_DISPATCH
(
r
->
v
),
DISPID_VALUE
,
&
dp
,
&
r
->
store
);
hres
=
get_disp_value
(
ctx
->
script
,
V_DISPATCH
(
r
->
v
)
,
&
r
->
store
);
if
(
r
->
owned
)
IDispatch_Release
(
V_DISPATCH
(
r
->
v
));
if
(
FAILED
(
hres
))
...
...
@@ -354,12 +353,10 @@ static HRESULT stack_assume_val(exec_ctx_t *ctx, unsigned n)
}
if
(
V_VT
(
v
)
==
VT_DISPATCH
)
{
DISPPARAMS
dp
=
{
0
};
IDispatch
*
disp
;
disp
=
V_DISPATCH
(
v
);
V_VT
(
v
)
=
VT_EMPTY
;
hres
=
disp_call
(
ctx
->
script
,
disp
,
DISPID_VALUE
,
&
dp
,
v
);
hres
=
get_disp_value
(
ctx
->
script
,
disp
,
v
);
IDispatch_Release
(
disp
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -706,10 +703,9 @@ static HRESULT assign_value(exec_ctx_t *ctx, VARIANT *dst, VARIANT *src, WORD fl
return
hres
;
if
(
V_VT
(
dst
)
==
VT_DISPATCH
&&
!
(
flags
&
DISPATCH_PROPERTYPUTREF
))
{
DISPPARAMS
dp
=
{
NULL
};
VARIANT
value
;
hres
=
disp_call
(
ctx
->
script
,
V_DISPATCH
(
dst
),
DISPID_VALUE
,
&
dp
,
&
value
);
hres
=
get_disp_value
(
ctx
->
script
,
V_DISPATCH
(
dst
)
,
&
value
);
IDispatch_Release
(
V_DISPATCH
(
dst
));
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/vbscript/vbdisp.c
View file @
0de7b95c
...
...
@@ -105,15 +105,12 @@ static HRESULT get_propput_arg(script_ctx_t *ctx, const DISPPARAMS *dp, WORD fla
if
(
V_VT
(
v
)
==
VT_DISPATCH
)
{
if
(
!
(
flags
&
DISPATCH_PROPERTYPUTREF
))
{
DISPPARAMS
val_dp
=
{
NULL
};
VARIANT
value
;
HRESULT
hres
;
hres
=
disp_call
(
ctx
,
V_DISPATCH
(
v
),
DISPID_VALUE
,
&
val_dp
,
&
value
);
hres
=
get_disp_value
(
ctx
,
V_DISPATCH
(
v
),
v
);
if
(
FAILED
(
hres
))
return
hres
;
*
v
=
value
;
*
is_owned
=
TRUE
;
}
}
else
if
(
!
(
flags
&
DISPATCH_PROPERTYPUT
))
{
...
...
@@ -1102,6 +1099,12 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp,
return
hres
;
}
HRESULT
get_disp_value
(
script_ctx_t
*
ctx
,
IDispatch
*
disp
,
VARIANT
*
v
)
{
DISPPARAMS
dp
=
{
NULL
};
return
disp_call
(
ctx
,
disp
,
DISPID_VALUE
,
&
dp
,
v
);
}
HRESULT
disp_propput
(
script_ctx_t
*
ctx
,
IDispatch
*
disp
,
DISPID
id
,
WORD
flags
,
DISPPARAMS
*
dp
)
{
IDispatchEx
*
dispex
;
...
...
dlls/vbscript/vbscript.h
View file @
0de7b95c
...
...
@@ -149,6 +149,7 @@ HRESULT disp_get_id(IDispatch*,BSTR,vbdisp_invoke_type_t,BOOL,DISPID*) DECLSPEC_
HRESULT
vbdisp_get_id
(
vbdisp_t
*
,
BSTR
,
vbdisp_invoke_type_t
,
BOOL
,
DISPID
*
)
DECLSPEC_HIDDEN
;
HRESULT
disp_call
(
script_ctx_t
*
,
IDispatch
*
,
DISPID
,
DISPPARAMS
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
disp_propput
(
script_ctx_t
*
,
IDispatch
*
,
DISPID
,
WORD
,
DISPPARAMS
*
)
DECLSPEC_HIDDEN
;
HRESULT
get_disp_value
(
script_ctx_t
*
,
IDispatch
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
void
collect_objects
(
script_ctx_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
create_procedure_disp
(
script_ctx_t
*
,
vbscode_t
*
,
IDispatch
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_script_disp
(
script_ctx_t
*
,
ScriptDisp
**
)
DECLSPEC_HIDDEN
;
...
...
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