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
abb2d287
Commit
abb2d287
authored
Sep 22, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Lookup global object before host-provided objects.
parent
f61bd1c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
interp.c
dlls/vbscript/interp.c
+23
-21
No files found.
dlls/vbscript/interp.c
View file @
abb2d287
...
@@ -126,12 +126,14 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
...
@@ -126,12 +126,14 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
if
(
lookup_dynamic_vars
(
ctx
->
func
->
type
==
FUNC_GLOBAL
?
ctx
->
script
->
global_vars
:
ctx
->
dynamic_vars
,
name
,
ref
))
if
(
lookup_dynamic_vars
(
ctx
->
func
->
type
==
FUNC_GLOBAL
?
ctx
->
script
->
global_vars
:
ctx
->
dynamic_vars
,
name
,
ref
))
return
S_OK
;
return
S_OK
;
hres
=
disp_get_id
(
ctx
->
this_obj
,
name
,
invoke_type
,
TRUE
,
&
id
);
if
(
ctx
->
func
->
type
!=
FUNC_GLOBAL
)
{
if
(
SUCCEEDED
(
hres
))
{
hres
=
disp_get_id
(
ctx
->
this_obj
,
name
,
invoke_type
,
TRUE
,
&
id
);
ref
->
type
=
REF_DISP
;
if
(
SUCCEEDED
(
hres
))
{
ref
->
u
.
d
.
disp
=
ctx
->
this_obj
;
ref
->
type
=
REF_DISP
;
ref
->
u
.
d
.
id
=
id
;
ref
->
u
.
d
.
disp
=
ctx
->
this_obj
;
return
S_OK
;
ref
->
u
.
d
.
id
=
id
;
return
S_OK
;
}
}
}
if
(
ctx
->
func
->
type
!=
FUNC_GLOBAL
&&
lookup_dynamic_vars
(
ctx
->
script
->
global_vars
,
name
,
ref
))
if
(
ctx
->
func
->
type
!=
FUNC_GLOBAL
&&
lookup_dynamic_vars
(
ctx
->
script
->
global_vars
,
name
,
ref
))
...
@@ -145,8 +147,22 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
...
@@ -145,8 +147,22 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
}
}
}
}
if
(
!
strcmpiW
(
name
,
errW
))
{
ref
->
type
=
REF_OBJ
;
ref
->
u
.
obj
=
(
IDispatch
*
)
&
ctx
->
script
->
err_obj
->
IDispatchEx_iface
;
return
S_OK
;
}
hres
=
vbdisp_get_id
(
ctx
->
script
->
global_obj
,
name
,
invoke_type
,
TRUE
,
&
id
);
if
(
SUCCEEDED
(
hres
))
{
ref
->
type
=
REF_DISP
;
ref
->
u
.
d
.
disp
=
(
IDispatch
*
)
&
ctx
->
script
->
global_obj
->
IDispatchEx_iface
;
ref
->
u
.
d
.
id
=
id
;
return
S_OK
;
}
LIST_FOR_EACH_ENTRY
(
item
,
&
ctx
->
script
->
named_items
,
named_item_t
,
entry
)
{
LIST_FOR_EACH_ENTRY
(
item
,
&
ctx
->
script
->
named_items
,
named_item_t
,
entry
)
{
if
((
item
->
flags
&
SCRIPTITEM_GLOBALMEMBERS
)
&&
item
->
disp
!=
ctx
->
this_obj
)
{
if
((
item
->
flags
&
SCRIPTITEM_GLOBALMEMBERS
))
{
hres
=
disp_get_id
(
item
->
disp
,
name
,
invoke_type
,
FALSE
,
&
id
);
hres
=
disp_get_id
(
item
->
disp
,
name
,
invoke_type
,
FALSE
,
&
id
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
ref
->
type
=
REF_DISP
;
ref
->
type
=
REF_DISP
;
...
@@ -180,20 +196,6 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
...
@@ -180,20 +196,6 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
}
}
}
}
if
(
!
strcmpiW
(
name
,
errW
))
{
ref
->
type
=
REF_OBJ
;
ref
->
u
.
obj
=
(
IDispatch
*
)
&
ctx
->
script
->
err_obj
->
IDispatchEx_iface
;
return
S_OK
;
}
hres
=
vbdisp_get_id
(
ctx
->
script
->
global_obj
,
name
,
invoke_type
,
TRUE
,
&
id
);
if
(
SUCCEEDED
(
hres
))
{
ref
->
type
=
REF_DISP
;
ref
->
u
.
d
.
disp
=
(
IDispatch
*
)
&
ctx
->
script
->
global_obj
->
IDispatchEx_iface
;
ref
->
u
.
d
.
id
=
id
;
return
S_OK
;
}
ref
->
type
=
REF_NONE
;
ref
->
type
=
REF_NONE
;
return
S_OK
;
return
S_OK
;
}
}
...
...
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