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
dd2fcd6a
Commit
dd2fcd6a
authored
Sep 25, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrobj: Add GetDispID implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b3b78b42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
scrobj.c
dlls/scrobj/scrobj.c
+20
-2
scrobj.c
dlls/scrobj/tests/scrobj.c
+0
-8
No files found.
dlls/scrobj/scrobj.c
View file @
dd2fcd6a
...
...
@@ -1046,8 +1046,26 @@ static HRESULT WINAPI scriptlet_Invoke(IDispatchEx *iface, DISPID dispIdMember,
static
HRESULT
WINAPI
scriptlet_GetDispID
(
IDispatchEx
*
iface
,
BSTR
bstrName
,
DWORD
grfdex
,
DISPID
*
pid
)
{
struct
scriptlet_instance
*
This
=
impl_from_IDispatchEx
(
iface
);
FIXME
(
"(%p)->(%s %x %p)
\n
"
,
This
,
debugstr_w
(
bstrName
),
grfdex
,
pid
);
return
E_NOTIMPL
;
unsigned
i
;
TRACE
(
"(%p)->(%s %x %p)
\n
"
,
This
,
debugstr_w
(
bstrName
),
grfdex
,
pid
);
if
(
grfdex
&
~
(
fdexNameCaseInsensitive
|
fdexNameCaseSensitive
))
FIXME
(
"Unsupported grfdex %x
\n
"
,
grfdex
);
for
(
i
=
0
;
i
<
This
->
member_cnt
;
i
++
)
{
if
(
grfdex
&
fdexNameCaseInsensitive
)
{
if
(
wcsicmp
(
This
->
members
[
i
].
name
,
bstrName
))
continue
;
}
else
if
(
wcscmp
(
This
->
members
[
i
].
name
,
bstrName
))
continue
;
*
pid
=
i
+
1
;
return
S_OK
;
}
WARN
(
"Unknown property %s
\n
"
,
debugstr_w
(
bstrName
));
return
DISP_E_UNKNOWNNAME
;
}
static
HRESULT
WINAPI
scriptlet_InvokeEx
(
IDispatchEx
*
iface
,
DISPID
id
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
pdp
,
...
...
dlls/scrobj/tests/scrobj.c
View file @
dd2fcd6a
...
...
@@ -848,45 +848,37 @@ static void test_create_object(void)
str
=
SysAllocString
(
L"vbAddOne"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
str
,
fdexNameCaseSensitive
,
&
vb_add_one_id
);
todo_wine
ok
(
hres
==
S_OK
,
"Could not get vkAddOne id: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
SysAllocString
(
L"jsAddTwo"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
str
,
fdexNameCaseSensitive
,
&
js_add_two_id
);
todo_wine
ok
(
hres
==
S_OK
,
"Could not get jsAddTwo id: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
SysAllocString
(
L"wtTest"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
str
,
fdexNameCaseSensitive
,
&
wt_test_id
);
todo_wine
ok
(
hres
==
S_OK
,
"Could not get wtTest id: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
SysAllocString
(
L"gsProp"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
str
,
fdexNameCaseSensitive
,
&
wt_gsprop_id
);
todo_wine
ok
(
hres
==
S_OK
,
"Could not get wtTest id: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
SysAllocString
(
L"vbaddone"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
str
,
fdexNameCaseSensitive
,
&
id
);
todo_wine
ok
(
hres
==
DISP_E_UNKNOWNNAME
,
"invalid case returned: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
SysAllocString
(
L"vbaddone"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
str
,
0
,
&
id
);
todo_wine
ok
(
hres
==
DISP_E_UNKNOWNNAME
,
"invalid case returned: %08x
\n
"
,
hres
);
SysFreeString
(
str
);
str
=
SysAllocString
(
L"vbaddone"
);
hres
=
IDispatchEx_GetDispID
(
dispex
,
str
,
fdexNameCaseInsensitive
,
&
id
);
todo_wine
ok
(
hres
==
S_OK
,
"case insensitive returned: %08x
\n
"
,
hres
);
todo_wine
ok
(
id
==
vb_add_one_id
,
"id = %u, expected %u
\n
"
,
id
,
vb_add_one_id
);
SysFreeString
(
str
);
...
...
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