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
17baf1e7
Commit
17baf1e7
authored
Jan 11, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Added more Invoke tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
69d34caf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletion
+40
-1
test_reg.idl
dlls/oleaut32/tests/test_reg.idl
+2
-0
typelib.c
dlls/oleaut32/tests/typelib.c
+38
-1
No files found.
dlls/oleaut32/tests/test_reg.idl
View file @
17baf1e7
...
@@ -141,6 +141,8 @@ library register_test
...
@@ -141,6 +141,8 @@ library register_test
LONG
testprop
(
[
in
]
LONG
*
i
)
;
LONG
testprop
(
[
in
]
LONG
*
i
)
;
[
propputref
,
id
(
2
)
]
[
propputref
,
id
(
2
)
]
LONG
testprop2
(
[
in
]
IUnknown
*
i
)
;
LONG
testprop2
(
[
in
]
IUnknown
*
i
)
;
[
id
(
3
)
]
HRESULT
testfunc
(
[
in
]
int
i
,
[
out
,
retval
]
int
*
p
)
;
}
}
/*
uuid
is
same
as
for
test_struct2
in
test_tlb
.
idl
,
fields
are
different
*/
/*
uuid
is
same
as
for
test_struct2
in
test_tlb
.
idl
,
fields
are
different
*/
...
...
dlls/oleaut32/tests/typelib.c
View file @
17baf1e7
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include "ocidl.h"
#include "ocidl.h"
#include "shlwapi.h"
#include "shlwapi.h"
#include "tmarshal.h"
#include "tmarshal.h"
#include "olectl.h"
#include "test_reg.h"
#include "test_reg.h"
#include "test_tlb.h"
#include "test_tlb.h"
...
@@ -156,6 +157,12 @@ static LONG WINAPI invoketest_putref_testprop2(IInvokeTest *iface, IUnknown *i)
...
@@ -156,6 +157,12 @@ static LONG WINAPI invoketest_putref_testprop2(IInvokeTest *iface, IUnknown *i)
return
6
;
return
6
;
}
}
static
HRESULT
WINAPI
invoketest_testfunc
(
IInvokeTest
*
iface
,
int
i
,
int
*
p
)
{
*
p
=
i
+
1
;
return
S_OK
;
}
static
const
IInvokeTestVtbl
invoketestvtbl
=
{
static
const
IInvokeTestVtbl
invoketestvtbl
=
{
invoketest_QueryInterface
,
invoketest_QueryInterface
,
invoketest_AddRef
,
invoketest_AddRef
,
...
@@ -166,7 +173,8 @@ static const IInvokeTestVtbl invoketestvtbl = {
...
@@ -166,7 +173,8 @@ static const IInvokeTestVtbl invoketestvtbl = {
invoketest_Invoke
,
invoketest_Invoke
,
invoketest_get_test
,
invoketest_get_test
,
invoketest_putref_testprop
,
invoketest_putref_testprop
,
invoketest_putref_testprop2
invoketest_putref_testprop2
,
invoketest_testfunc
};
};
static
IInvokeTest
invoketest
=
{
&
invoketestvtbl
};
static
IInvokeTest
invoketest
=
{
&
invoketestvtbl
};
...
@@ -667,6 +675,33 @@ static void write_typelib(int res_no, const char *filename)
...
@@ -667,6 +675,33 @@ static void write_typelib(int res_no, const char *filename)
CloseHandle
(
file
);
CloseHandle
(
file
);
}
}
static
void
test_invoke_func
(
ITypeInfo
*
typeinfo
)
{
DISPID
named_args
[
3
]
=
{
DISPID_THIS
};
VARIANT
args
[
3
],
res
;
DISPPARAMS
dp
=
{
args
,
named_args
,
1
,
0
};
UINT
i
;
HRESULT
hres
;
V_VT
(
args
)
=
VT_INT
;
V_INT
(
args
)
=
3
;
V_VT
(
&
res
)
=
VT_ERROR
;
hres
=
ITypeInfo_Invoke
(
typeinfo
,
&
invoketest
,
3
,
DISPATCH_METHOD
,
&
dp
,
&
res
,
NULL
,
&
i
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
ok
(
V_VT
(
&
res
)
==
VT_I4
,
"got %d
\n
"
,
V_VT
(
&
res
));
ok
(
V_I4
(
&
res
)
==
4
,
"got %d
\n
"
,
V_I4
(
&
res
));
V_VT
(
args
)
=
VT_DISPATCH
;
V_DISPATCH
(
args
)
=
(
IDispatch
*
)
&
invoketest
;
V_VT
(
args
+
1
)
=
VT_INT
;
V_INT
(
args
+
1
)
=
3
;
V_VT
(
&
res
)
=
VT_ERROR
;
dp
.
cNamedArgs
=
1
;
dp
.
cArgs
=
2
;
hres
=
ITypeInfo_Invoke
(
typeinfo
,
&
invoketest
,
3
,
DISPATCH_METHOD
,
&
dp
,
&
res
,
NULL
,
&
i
);
ok
(
hres
==
DISP_E_BADPARAMCOUNT
,
"got 0x%08x
\n
"
,
hres
);
}
static
const
char
*
create_test_typelib
(
int
res_no
)
static
const
char
*
create_test_typelib
(
int
res_no
)
{
{
static
char
filename
[
MAX_PATH
];
static
char
filename
[
MAX_PATH
];
...
@@ -959,6 +994,8 @@ static void test_TypeInfo(void)
...
@@ -959,6 +994,8 @@ static void test_TypeInfo(void)
hr
=
ITypeInfo_Invoke
(
pTypeInfo
,
&
invoketest
,
2
,
DISPATCH_PROPERTYPUT
,
&
dispparams
,
&
res
,
NULL
,
&
i
);
hr
=
ITypeInfo_Invoke
(
pTypeInfo
,
&
invoketest
,
2
,
DISPATCH_PROPERTYPUT
,
&
dispparams
,
&
res
,
NULL
,
&
i
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"got 0x%08x, %d
\n
"
,
hr
,
i
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"got 0x%08x, %d
\n
"
,
hr
,
i
);
test_invoke_func
(
pTypeInfo
);
ITypeInfo_Release
(
pTypeInfo
);
ITypeInfo_Release
(
pTypeInfo
);
ITypeLib_Release
(
pTypeLib
);
ITypeLib_Release
(
pTypeLib
);
DeleteFileA
(
filenameA
);
DeleteFileA
(
filenameA
);
...
...
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