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
8ff7238a
Commit
8ff7238a
authored
Mar 19, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Allow named args to be combined with positional args in fnInvoke.
parent
b6ef8a59
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
3 deletions
+35
-3
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+26
-0
tmarshal.idl
dlls/oleaut32/tests/tmarshal.idl
+3
-0
tmarshal_dispids.h
dlls/oleaut32/tests/tmarshal_dispids.h
+1
-0
typelib.c
dlls/oleaut32/typelib.c
+5
-3
No files found.
dlls/oleaut32/tests/tmarshal.c
View file @
8ff7238a
...
...
@@ -603,6 +603,15 @@ static HRESULT WINAPI Widget_put_prop_opt_arg(
return
S_OK
;
}
static
HRESULT
WINAPI
Widget_put_prop_req_arg
(
IWidget
*
iface
,
INT
req
,
INT
i
)
{
trace
(
"put_prop_req_arg(%08x, %08x)
\n
"
,
req
,
i
);
ok
(
req
==
0x5678
,
"got req=%08x
\n
"
,
req
);
ok
(
i
==
0x1234
,
"got i=%08x
\n
"
,
i
);
return
S_OK
;
}
static
const
struct
IWidgetVtbl
Widget_VTable
=
{
Widget_QueryInterface
,
...
...
@@ -637,6 +646,7 @@ static const struct IWidgetVtbl Widget_VTable =
Widget_get_prop_uint
,
Widget_ByRefUInt
,
Widget_put_prop_opt_arg
,
Widget_put_prop_req_arg
,
};
static
HRESULT
WINAPI
StaticWidget_QueryInterface
(
IStaticWidget
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
...
...
@@ -1410,6 +1420,22 @@ static void test_typelibmarshal(void)
ok_ole_success
(
hr
,
ITypeInfo_Invoke
);
VariantClear
(
&
varresult
);
/* test propput with required argument. */
VariantInit
(
&
vararg
[
0
]);
VariantInit
(
&
vararg
[
1
]);
V_VT
(
&
vararg
[
0
])
=
VT_I4
;
V_I4
(
&
vararg
[
0
])
=
0x1234
;
V_VT
(
&
vararg
[
1
])
=
VT_I4
;
V_I4
(
&
vararg
[
1
])
=
0x5678
;
dispparams
.
cNamedArgs
=
1
;
dispparams
.
rgdispidNamedArgs
=
&
dispidNamed
;
dispparams
.
cArgs
=
2
;
dispparams
.
rgvarg
=
vararg
;
VariantInit
(
&
varresult
);
hr
=
IDispatch_Invoke
(
pDispatch
,
DISPID_TM_PROP_REQ_ARG
,
&
IID_NULL
,
0x40c
,
DISPATCH_PROPERTYPUT
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
ok_ole_success
(
hr
,
ITypeInfo_Invoke
);
VariantClear
(
&
varresult
);
IDispatch_Release
(
pDispatch
);
IWidget_Release
(
pWidget
);
...
...
dlls/oleaut32/tests/tmarshal.idl
View file @
8ff7238a
...
...
@@ -143,6 +143,9 @@ library TestTypelib
[
id
(
DISPID_TM_PROP_OPT_ARG
),
propput
]
HRESULT
prop_opt_arg
(
[
in
,
optional
]
INT
opt
,
[
in
]
INT
i
)
;
[
id
(
DISPID_TM_PROP_REQ_ARG
),
propput
]
HRESULT
prop_req_arg
(
[
in
]
INT
req
,
[
in
]
INT
i
)
;
}
[
...
...
dlls/oleaut32/tests/tmarshal_dispids.h
View file @
8ff7238a
...
...
@@ -39,6 +39,7 @@
#define DISPID_TM_PROP_UINT 20
#define DISPID_TM_BYREF_UINT 21
#define DISPID_TM_PROP_OPT_ARG 22
#define DISPID_TM_PROP_REQ_ARG 23
#define DISPID_NOA_BSTRRET 1
#define DISPID_NOA_ERROR 2
dlls/oleaut32/typelib.c
View file @
8ff7238a
...
...
@@ -6102,10 +6102,11 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
continue
;
}
src_arg
=
NULL
;
if
(
cNamedArgs
)
{
USHORT
j
;
src_arg
=
NULL
;
for
(
j
=
0
;
j
<
cNamedArgs
;
j
++
)
if
(
rgdispidNamedArgs
[
j
]
==
i
||
(
i
==
func_desc
->
cParams
-
1
&&
rgdispidNamedArgs
[
j
]
==
DISPID_PROPERTYPUT
))
{
...
...
@@ -6113,9 +6114,10 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
break
;
}
}
else
if
(
!
src_arg
&&
vargs_converted
+
cNamedArgs
<
pDispParams
->
cArgs
)
{
src_arg
=
vargs_converted
<
pDispParams
->
cArgs
?
&
pDispParams
->
rgvarg
[
pDispParams
->
cArgs
-
1
-
vargs_converted
]
:
NULL
;
src_arg
=
&
pDispParams
->
rgvarg
[
pDispParams
->
cArgs
-
1
-
vargs_converted
]
;
vargs_converted
++
;
}
...
...
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