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
3690fa04
Commit
3690fa04
authored
Dec 03, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Dec 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Add test for calling method with coclass argument.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a78efe16
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+26
-3
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 @
3690fa04
...
...
@@ -598,7 +598,7 @@ static HRESULT WINAPI Widget_CloneCoclass(
ApplicationObject2
**
ppVal
)
{
trace
(
"CloneCoclass()
\n
"
);
return
S_OK
;
return
Widget_QueryInterface
(
iface
,
&
IID_IWidget
,
(
void
**
)
ppVal
)
;
}
static
HRESULT
WINAPI
Widget_Value
(
...
...
@@ -909,6 +909,14 @@ static HRESULT WINAPI Widget_VarArg_Ref_Run(
return
S_OK
;
}
static
HRESULT
WINAPI
Widget_Coclass
(
IWidget
*
iface
,
ApplicationObject2
*
param
)
{
trace
(
"Coclass(%p)
\n
"
,
param
);
ok
(
param
==
(
ApplicationObject2
*
)
iface
,
"expected param == %p, got %p
\n
"
,
iface
,
param
);
return
S_OK
;
}
static
const
struct
IWidgetVtbl
Widget_VTable
=
{
Widget_QueryInterface
,
...
...
@@ -948,7 +956,8 @@ static const struct IWidgetVtbl Widget_VTable =
Widget_pos_restrict
,
Widget_neg_restrict
,
Widget_VarArg_Run
,
Widget_VarArg_Ref_Run
Widget_VarArg_Ref_Run
,
Widget_Coclass
,
};
static
HRESULT
WINAPI
StaticWidget_QueryInterface
(
IStaticWidget
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
...
...
@@ -1494,8 +1503,22 @@ static void test_typelibmarshal(void)
excepinfo
.
wCode
,
excepinfo
.
scode
);
ok
(
V_VT
(
&
varresult
)
==
VT_DISPATCH
,
"V_VT(&varresult) was %d instead of VT_DISPATCH
\n
"
,
V_VT
(
&
varresult
));
ok
(
!
V_DISPATCH
(
&
varresult
),
"V_DISPATCH(&varresult) should be NULL instead of %p
\n
"
,
V_DISPATCH
(
&
varresult
));
ok
(
V_DISPATCH
(
&
varresult
)
!=
NULL
,
"expected V_DISPATCH(&varresult) != NULL
\n
"
);
/* call Coclass with VT_DISPATCH type */
vararg
[
0
]
=
varresult
;
dispparams
.
cNamedArgs
=
0
;
dispparams
.
rgdispidNamedArgs
=
NULL
;
dispparams
.
cArgs
=
1
;
dispparams
.
rgvarg
=
vararg
;
VariantInit
(
&
varresult
);
hr
=
IDispatch_Invoke
(
pDispatch
,
DISPID_TM_COCLASS
,
&
IID_NULL
,
LOCALE_NEUTRAL
,
DISPATCH_METHOD
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
todo_wine
ok_ole_success
(
hr
,
IDispatch_Invoke
);
ok
(
excepinfo
.
wCode
==
0x0
&&
excepinfo
.
scode
==
S_OK
,
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x
\n
"
,
excepinfo
.
wCode
,
excepinfo
.
scode
);
VariantClear
(
&
varresult
);
VariantClear
(
&
vararg
[
0
]);
/* call Value with a VT_VARIANT|VT_BYREF type */
V_VT
(
&
vararg
[
0
])
=
VT_VARIANT
|
VT_BYREF
;
...
...
dlls/oleaut32/tests/tmarshal.idl
View file @
3690fa04
...
...
@@ -185,6 +185,9 @@ library TestTypelib
[
id
(
DISPID_TM_VARARG_REF_RUN
),
vararg
]
HRESULT
VarArg_Ref_Run
(
[
in
]
BSTR
name
,
[
in
]
SAFEARRAY
(
VARIANT
)
*
params
,
[
out
,
retval
]
VARIANT
*
result
)
;
[
id
(
DISPID_TM_COCLASS
)
]
HRESULT
Coclass
(
[
in
]
ApplicationObject2
*
param
)
;
}
[
...
...
dlls/oleaut32/tests/tmarshal_dispids.h
View file @
3690fa04
...
...
@@ -46,6 +46,7 @@
#define DISPID_TM_TESTSECONDIFACE 27
#define DISPID_TM_VARARG_RUN 28
#define DISPID_TM_VARARG_REF_RUN 29
#define DISPID_TM_COCLASS 30
#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