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
1742012f
Commit
1742012f
authored
Aug 20, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Added more tests.
parent
44936abd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
1 deletion
+68
-1
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+55
-1
tmarshal.idl
dlls/oleaut32/tests/tmarshal.idl
+12
-0
tmarshal_dispids.h
dlls/oleaut32/tests/tmarshal_dispids.h
+1
-0
No files found.
dlls/oleaut32/tests/tmarshal.c
View file @
1742012f
...
@@ -153,6 +153,35 @@ static void end_host_object(DWORD tid, HANDLE thread)
...
@@ -153,6 +153,35 @@ static void end_host_object(DWORD tid, HANDLE thread)
static
ItestDual
TestDual
,
TestDualDisp
;
static
ItestDual
TestDual
,
TestDualDisp
;
static
HRESULT
WINAPI
TestSecondIface_QueryInterface
(
ITestSecondIface
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
return
ItestDual_QueryInterface
(
&
TestDual
,
riid
,
ppv
);
}
static
ULONG
WINAPI
TestSecondIface_AddRef
(
ITestSecondIface
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
TestSecondIface_Release
(
ITestSecondIface
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
TestSecondIface_test
(
ITestSecondIface
*
iface
)
{
return
1
;
}
static
const
ITestSecondIfaceVtbl
TestSecondIfaceVtbl
=
{
TestSecondIface_QueryInterface
,
TestSecondIface_AddRef
,
TestSecondIface_Release
,
TestSecondIface_test
};
static
ITestSecondIface
TestSecondIface
=
{
&
TestSecondIfaceVtbl
};
static
HRESULT
WINAPI
TestDual_QueryInterface
(
ItestDual
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
static
HRESULT
WINAPI
TestDual_QueryInterface
(
ItestDual
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
{
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDispatch
))
{
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDispatch
))
{
...
@@ -161,6 +190,9 @@ static HRESULT WINAPI TestDual_QueryInterface(ItestDual *iface, REFIID riid, voi
...
@@ -161,6 +190,9 @@ static HRESULT WINAPI TestDual_QueryInterface(ItestDual *iface, REFIID riid, voi
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_ItestDual
))
{
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_ItestDual
))
{
*
ppvObject
=
&
TestDual
;
*
ppvObject
=
&
TestDual
;
return
S_OK
;
return
S_OK
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_ITestSecondIface
))
{
*
ppvObject
=
&
TestSecondIface
;
return
S_OK
;
}
}
*
ppvObject
=
NULL
;
*
ppvObject
=
NULL
;
...
@@ -786,6 +818,13 @@ static HRESULT WINAPI StaticWidget_TestDual(IStaticWidget *iface, ItestDual *p)
...
@@ -786,6 +818,13 @@ static HRESULT WINAPI StaticWidget_TestDual(IStaticWidget *iface, ItestDual *p)
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
StaticWidget_TestSecondIface
(
IStaticWidget
*
iface
,
ITestSecondIface
*
p
)
{
trace
(
"TestSecondIface()
\n
"
);
ok
(
p
==
&
TestSecondIface
,
"wrong ItestSecondIface
\n
"
);
return
S_OK
;
}
static
const
IStaticWidgetVtbl
StaticWidgetVtbl
=
{
static
const
IStaticWidgetVtbl
StaticWidgetVtbl
=
{
StaticWidget_QueryInterface
,
StaticWidget_QueryInterface
,
StaticWidget_AddRef
,
StaticWidget_AddRef
,
...
@@ -794,7 +833,8 @@ static const IStaticWidgetVtbl StaticWidgetVtbl = {
...
@@ -794,7 +833,8 @@ static const IStaticWidgetVtbl StaticWidgetVtbl = {
StaticWidget_GetTypeInfo
,
StaticWidget_GetTypeInfo
,
StaticWidget_GetIDsOfNames
,
StaticWidget_GetIDsOfNames
,
StaticWidget_Invoke
,
StaticWidget_Invoke
,
StaticWidget_TestDual
StaticWidget_TestDual
,
StaticWidget_TestSecondIface
};
};
static
IStaticWidget
StaticWidget
=
{
&
StaticWidgetVtbl
};
static
IStaticWidget
StaticWidget
=
{
&
StaticWidgetVtbl
};
...
@@ -1624,6 +1664,20 @@ static void test_StaticWidget(void)
...
@@ -1624,6 +1664,20 @@ static void test_StaticWidget(void)
ok
(
V_VT
(
&
varresult
)
==
VT_EMPTY
,
"vt %x
\n
"
,
V_VT
(
&
varresult
));
ok
(
V_VT
(
&
varresult
)
==
VT_EMPTY
,
"vt %x
\n
"
,
V_VT
(
&
varresult
));
VariantClear
(
&
varresult
);
VariantClear
(
&
varresult
);
/* call TestSecondIface */
dispparams
.
cNamedArgs
=
0
;
dispparams
.
cArgs
=
1
;
dispparams
.
rgdispidNamedArgs
=
NULL
;
dispparams
.
rgvarg
=
vararg
;
V_VT
(
vararg
)
=
VT_DISPATCH
;
V_DISPATCH
(
vararg
)
=
(
IDispatch
*
)
&
TestDualDisp
;
VariantInit
(
&
varresult
);
hr
=
ITypeInfo_Invoke
(
type_info
,
&
StaticWidget
,
DISPID_TM_TESTSECONDIFACE
,
DISPATCH_METHOD
,
&
dispparams
,
&
varresult
,
&
excepinfo
,
NULL
);
ok_ole_success
(
hr
,
IDispatch_Invoke
);
ok
(
V_VT
(
&
varresult
)
==
VT_EMPTY
,
"vt %x
\n
"
,
V_VT
(
&
varresult
));
VariantClear
(
&
varresult
);
ITypeInfo_Release
(
type_info
);
ITypeInfo_Release
(
type_info
);
}
}
...
...
dlls/oleaut32/tests/tmarshal.idl
View file @
1742012f
...
@@ -66,6 +66,15 @@ library TestTypelib
...
@@ -66,6 +66,15 @@ library TestTypelib
[
[
odl
,
odl
,
uuid
(
3
f7e06fe
-
0b
ce
-
46
f0
-
8b
7d-3
a68393c7968
)
]
interface
ITestSecondIface
:
IUnknown
{
HRESULT
test
()
;
}
[
odl
,
uuid
(
a1f8cae3
-
c947
-
4
c5f
-
b57d
-
c87b9b5f3586
),
uuid
(
a1f8cae3
-
c947
-
4
c5f
-
b57d
-
c87b9b5f3586
),
oleautomation
,
oleautomation
,
dual
dual
...
@@ -168,6 +177,9 @@ library TestTypelib
...
@@ -168,6 +177,9 @@ library TestTypelib
{
{
[
id
(
DISPID_TM_TESTDUAL
)
]
[
id
(
DISPID_TM_TESTDUAL
)
]
HRESULT
TestDual
(
[
in
]
ItestDual
*
p
)
;
HRESULT
TestDual
(
[
in
]
ItestDual
*
p
)
;
[
id
(
DISPID_TM_TESTSECONDIFACE
)
]
HRESULT
TestSecondIface
(
[
in
]
ITestSecondIface
*
p
)
;
}
}
[
[
...
...
dlls/oleaut32/tests/tmarshal_dispids.h
View file @
1742012f
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
#define DISPID_TM_VARCARRAY 24
#define DISPID_TM_VARCARRAY 24
#define DISPID_TM_RESTRICTED 25
#define DISPID_TM_RESTRICTED 25
#define DISPID_TM_NEG_RESTRICTED -26
#define DISPID_TM_NEG_RESTRICTED -26
#define DISPID_TM_TESTSECONDIFACE 27
#define DISPID_NOA_BSTRRET 1
#define DISPID_NOA_BSTRRET 1
#define DISPID_NOA_ERROR 2
#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