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
f4ee83c0
Commit
f4ee83c0
authored
Mar 18, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Handle bare interfaces as top-level parameters.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c43998cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+22
-0
tmarshal.idl
dlls/oleaut32/tests/tmarshal.idl
+4
-0
ndr_typelib.c
dlls/rpcrt4/ndr_typelib.c
+11
-0
No files found.
dlls/oleaut32/tests/tmarshal.c
View file @
f4ee83c0
...
...
@@ -1291,6 +1291,12 @@ static HRESULT WINAPI Widget_iface_ptr(IWidget *iface, ISomethingFromDispatch **
return
S_OK
;
}
static
HRESULT
WINAPI
Widget_iface_noptr
(
IWidget
*
iface
,
IUnknown
unk
,
IDispatch
disp
,
ISomethingFromDispatch
sfd
)
{
check_iface_marshal
((
IUnknown
*
)
unk
.
lpVtbl
,
(
IDispatch
*
)
disp
.
lpVtbl
,
(
ISomethingFromDispatch
*
)
sfd
.
lpVtbl
);
return
S_OK
;
}
static
HRESULT
WINAPI
Widget_bstr
(
IWidget
*
iface
,
BSTR
in
,
BSTR
*
out
,
BSTR
*
in_ptr
,
BSTR
*
in_out
)
{
UINT
len
;
...
...
@@ -1623,6 +1629,7 @@ static const struct IWidgetVtbl Widget_VTable =
Widget_iface_in
,
Widget_iface_out
,
Widget_iface_ptr
,
Widget_iface_noptr
,
Widget_bstr
,
Widget_variant
,
Widget_safearray
,
...
...
@@ -2169,6 +2176,9 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp)
ISomethingFromDispatch
*
sfd1
,
*
sfd2
,
*
sfd3
,
*
proxy_sfd
,
*
sfd_in
,
*
sfd_out
,
*
sfd_in_out
;
IUnknown
*
proxy_unk
,
*
proxy_unk2
,
*
unk_in
,
*
unk_out
,
*
unk_in_out
;
IDispatch
*
proxy_disp
;
IUnknown
unk_noptr
;
IDispatch
disp_noptr
;
ISomethingFromDispatch
sfd_noptr
;
HRESULT
hr
;
testmode
=
0
;
...
...
@@ -2251,6 +2261,18 @@ static void test_marshal_iface(IWidget *widget, IDispatch *disp)
ok
(
!
sfd_in_out
,
"Got [in, out] %p.
\n
"
,
sfd_in_out
);
release_iface
(
sfd3
);
sfd1
=
create_disp_obj
();
sfd2
=
create_disp_obj
();
sfd3
=
create_disp_obj
();
unk_noptr
.
lpVtbl
=
(
IUnknownVtbl
*
)
sfd1
;
disp_noptr
.
lpVtbl
=
(
IDispatchVtbl
*
)
sfd2
;
sfd_noptr
.
lpVtbl
=
(
ISomethingFromDispatchVtbl
*
)
sfd3
;
hr
=
IWidget_iface_noptr
(
widget
,
unk_noptr
,
disp_noptr
,
sfd_noptr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
release_iface
(
sfd1
);
release_iface
(
sfd2
);
release_iface
(
sfd3
);
/* Test with Invoke(). Note that since we pass VT_UNKNOWN, we don't get our
* interface back, but rather an IUnknown. */
...
...
dlls/oleaut32/tests/tmarshal.idl
View file @
f4ee83c0
...
...
@@ -58,6 +58,7 @@ enum IWidget_dispids
DISPID_TM_IFACE_IN
,
DISPID_TM_IFACE_OUT
,
DISPID_TM_IFACE_PTR
,
DISPID_TM_IFACE_NOPTR
,
DISPID_TM_BSTR
,
DISPID_TM_VARIANT
,
DISPID_TM_SAFEARRAY
,
...
...
@@ -312,6 +313,9 @@ library TestTypelib
[
id
(
DISPID_TM_IFACE_PTR
)
]
HRESULT
iface_ptr
(
[
in
]
ISomethingFromDispatch
**
in
,
[
out
]
ISomethingFromDispatch
**
out
,
[
in
,
out
]
ISomethingFromDispatch
**
in_out
)
;
[
id
(
DISPID_TM_IFACE_NOPTR
)
]
HRESULT
iface_noptr
(
[
in
]
IUnknown
unk
,
[
in
]
IDispatch
disp
,
[
in
]
ISomethingFromDispatch
sfd
)
;
[
id
(
DISPID_TM_BSTR
)
]
HRESULT
bstr
(
[
in
]
BSTR
in
,
[
out
]
BSTR
*
out
,
[
in
]
BSTR
*
in_ptr
,
[
in
,
out
]
BSTR
*
in_out
)
;
...
...
dlls/rpcrt4/ndr_typelib.c
View file @
f4ee83c0
...
...
@@ -810,6 +810,10 @@ static size_t write_type_tfs(ITypeInfo *typeinfo, unsigned char *str,
break
;
case
TKIND_INTERFACE
:
case
TKIND_DISPATCH
:
/* These are treated as if they were interface pointers. */
off
=
*
len
;
write_ip_tfs
(
str
,
len
,
&
attr
->
guid
);
break
;
case
TKIND_COCLASS
:
assert
(
0
);
break
;
...
...
@@ -1000,6 +1004,13 @@ static HRESULT get_param_info(ITypeInfo *typeinfo, TYPEDESC *tdesc, int is_in,
hr
=
get_param_info
(
refinfo
,
&
attr
->
tdescAlias
,
is_in
,
is_out
,
server_size
,
flags
,
basetype
,
tfs_tdesc
);
break
;
case
TKIND_INTERFACE
:
case
TKIND_DISPATCH
:
/* These are treated as if they were interface pointers. */
*
flags
|=
MustFree
;
break
;
default:
FIXME
(
"unhandled kind %#x
\n
"
,
attr
->
typekind
);
hr
=
E_NOTIMPL
;
...
...
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