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
c28244a9
Commit
c28244a9
authored
Sep 04, 2015
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Add a test for calling a varargs method using typelib marshaller.
parent
2952822e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+27
-2
tmarshal.idl
dlls/oleaut32/tests/tmarshal.idl
+3
-0
tmarshal_dispids.h
dlls/oleaut32/tests/tmarshal_dispids.h
+1
-0
No files found.
dlls/oleaut32/tests/tmarshal.c
View file @
c28244a9
...
...
@@ -839,6 +839,13 @@ static HRESULT WINAPI Widget_neg_restrict(IWidget* iface, INT *i)
return
S_OK
;
}
static
HRESULT
WINAPI
Widget_VarArg_Run
(
IWidget
*
iface
,
BSTR
name
,
SAFEARRAY
*
params
,
VARIANT
*
result
)
{
trace
(
"VarArg_Run(%p,%p,%p)
\n
"
,
name
,
params
,
result
);
return
S_OK
;
}
static
const
struct
IWidgetVtbl
Widget_VTable
=
{
Widget_QueryInterface
,
...
...
@@ -876,7 +883,8 @@ static const struct IWidgetVtbl Widget_VTable =
Widget_put_prop_opt_arg
,
Widget_put_prop_req_arg
,
Widget_pos_restrict
,
Widget_neg_restrict
Widget_neg_restrict
,
Widget_VarArg_Run
};
static
HRESULT
WINAPI
StaticWidget_QueryInterface
(
IStaticWidget
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
...
...
@@ -1492,7 +1500,7 @@ static void test_typelibmarshal(void)
dispparams
.
rgdispidNamedArgs
=
NULL
;
dispparams
.
rgvarg
=
vararg
;
hr
=
IDispatch_Invoke
(
pDispatch
,
DISPID_TM_VARARG
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_METHOD
,
&
dispparams
,
NULL
,
NULL
,
NULL
);
ok_ole_success
(
hr
,
I
TypeInfo
_Invoke
);
ok_ole_success
(
hr
,
I
Dispatch
_Invoke
);
/* call VarArg, even one (non-optional, non-safearray) named argument is not allowed */
dispidNamed
=
0
;
...
...
@@ -1502,6 +1510,23 @@ static void test_typelibmarshal(void)
ok
(
hr
==
DISP_E_NONAMEDARGS
,
"IDispatch_Invoke should have returned DISP_E_NONAMEDARGS instead of 0x%08x
\n
"
,
hr
);
dispidNamed
=
DISPID_PROPERTYPUT
;
/* call VarArg_Run */
VariantInit
(
&
vararg
[
1
]);
V_VT
(
&
vararg
[
1
])
=
VT_BSTR
;
V_BSTR
(
&
vararg
[
1
])
=
SysAllocString
(
szCat
);
VariantInit
(
&
vararg
[
0
]);
V_VT
(
&
vararg
[
0
])
=
VT_BSTR
;
V_BSTR
(
&
vararg
[
0
])
=
SysAllocString
(
NULL
);
dispparams
.
cNamedArgs
=
0
;
dispparams
.
cArgs
=
2
;
dispparams
.
rgdispidNamedArgs
=
NULL
;
dispparams
.
rgvarg
=
vararg
;
hr
=
IDispatch_Invoke
(
pDispatch
,
DISPID_TM_VARARG_RUN
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_METHOD
,
&
dispparams
,
NULL
,
NULL
,
NULL
);
todo_wine
ok_ole_success
(
hr
,
IDispatch_Invoke
);
SysFreeString
(
V_BSTR
(
&
vararg
[
1
]));
SysFreeString
(
V_BSTR
(
&
vararg
[
0
]));
/* call Error */
dispparams
.
cNamedArgs
=
0
;
dispparams
.
cArgs
=
0
;
...
...
dlls/oleaut32/tests/tmarshal.idl
View file @
c28244a9
...
...
@@ -179,6 +179,9 @@ library TestTypelib
[
id
(
DISPID_TM_NEG_RESTRICTED
),
restricted
]
HRESULT
neg_restrict
(
[
out
,
retval
]
INT
*
i
)
;
[
id
(
DISPID_TM_VARARG_RUN
),
vararg
]
HRESULT
VarArg_Run
(
[
in
]
BSTR
name
,
[
in
]
SAFEARRAY
(
VARIANT
)
params
,
[
out
,
retval
]
VARIANT
*
result
)
;
}
[
...
...
dlls/oleaut32/tests/tmarshal_dispids.h
View file @
c28244a9
...
...
@@ -44,6 +44,7 @@
#define DISPID_TM_RESTRICTED 25
#define DISPID_TM_NEG_RESTRICTED -26
#define DISPID_TM_TESTSECONDIFACE 27
#define DISPID_TM_VARARG_RUN 28
#define DISPID_NOA_BSTRRET 1
#define DISPID_NOA_ERROR 2
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