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
11d9a49b
Commit
11d9a49b
authored
Sep 09, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added GetNextDispID implementation.
parent
61734cd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
2 deletions
+66
-2
dispex.c
dlls/jscript/dispex.c
+66
-2
No files found.
dlls/jscript/dispex.c
View file @
11d9a49b
...
...
@@ -62,6 +62,21 @@ static inline dispex_prop_t *get_prop(DispatchEx *This, DISPID id)
return
This
->
props
+
id
;
}
static
DWORD
get_flags
(
DispatchEx
*
This
,
dispex_prop_t
*
prop
)
{
if
(
prop
->
type
==
PROP_PROTREF
)
{
dispex_prop_t
*
parent
=
get_prop
(
This
->
prototype
,
prop
->
u
.
ref
);
if
(
!
parent
)
{
prop
->
type
=
PROP_DELETED
;
return
0
;
}
return
get_flags
(
This
->
prototype
,
parent
);
}
return
prop
->
flags
;
}
static
const
builtin_prop_t
*
find_builtin_prop
(
DispatchEx
*
This
,
const
WCHAR
*
name
)
{
int
min
=
0
,
max
,
i
,
r
;
...
...
@@ -347,6 +362,30 @@ static HRESULT prop_put(DispatchEx *This, dispex_prop_t *prop, LCID lcid, DISPPA
return
S_OK
;
}
static
HRESULT
fill_protrefs
(
DispatchEx
*
This
)
{
dispex_prop_t
*
iter
,
*
prop
;
HRESULT
hres
;
if
(
!
This
->
prototype
)
return
S_OK
;
fill_protrefs
(
This
->
prototype
);
for
(
iter
=
This
->
prototype
->
props
;
iter
<
This
->
prototype
->
props
+
This
->
prototype
->
prop_cnt
;
iter
++
)
{
hres
=
find_prop_name
(
This
,
iter
->
name
,
&
prop
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
!
prop
)
{
prop
=
alloc_protref
(
This
,
iter
->
name
,
iter
-
This
->
prototype
->
props
);
if
(
!
prop
)
return
E_OUTOFMEMORY
;
}
}
return
S_OK
;
}
#define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface)
static
HRESULT
WINAPI
DispatchEx_QueryInterface
(
IDispatchEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -564,8 +603,33 @@ static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BS
static
HRESULT
WINAPI
DispatchEx_GetNextDispID
(
IDispatchEx
*
iface
,
DWORD
grfdex
,
DISPID
id
,
DISPID
*
pid
)
{
DispatchEx
*
This
=
DISPATCHEX_THIS
(
iface
);
FIXME
(
"(%p)->(%x %x %p)
\n
"
,
This
,
grfdex
,
id
,
pid
);
return
E_NOTIMPL
;
dispex_prop_t
*
iter
;
HRESULT
hres
;
TRACE
(
"(%p)->(%x %x %p)
\n
"
,
This
,
grfdex
,
id
,
pid
);
if
(
id
==
DISPID_STARTENUM
)
{
hres
=
fill_protrefs
(
This
);
if
(
FAILED
(
hres
))
return
hres
;
}
iter
=
get_prop
(
This
,
id
+
1
);
if
(
!
iter
)
{
*
pid
=
DISPID_STARTENUM
;
return
S_FALSE
;
}
while
(
iter
<
This
->
props
+
This
->
prop_cnt
)
{
if
(
iter
->
name
&&
(
get_flags
(
This
,
iter
)
&
PROPF_ENUM
))
{
*
pid
=
prop_to_id
(
This
,
iter
);
return
S_OK
;
}
iter
++
;
}
*
pid
=
DISPID_STARTENUM
;
return
S_FALSE
;
}
static
HRESULT
WINAPI
DispatchEx_GetNameSpaceParent
(
IDispatchEx
*
iface
,
IUnknown
**
ppunk
)
...
...
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