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
3bf97778
Commit
3bf97778
authored
Feb 22, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dispex/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bb895f4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
Makefile.in
dlls/dispex/tests/Makefile.in
+0
-1
marshal.c
dlls/dispex/tests/marshal.c
+11
-13
No files found.
dlls/dispex/tests/Makefile.in
View file @
3bf97778
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
dispex.dll
IMPORTS
=
oleaut32 ole32 rpcrt4 user32 gdi32 advapi32
...
...
dlls/dispex/tests/marshal.c
View file @
3bf97778
...
...
@@ -31,8 +31,6 @@
#include "wine/test.h"
#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr)
#define RELEASEMARSHALDATA WM_USER
struct
host_object_data
...
...
@@ -59,7 +57,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
IMessageFilter
*
prev_filter
=
NULL
;
hr
=
CoRegisterMessageFilter
(
data
->
filter
,
&
prev_filter
);
if
(
prev_filter
)
IMessageFilter_Release
(
prev_filter
);
ok
_ole_success
(
hr
,
CoRegisterMessageFilte
r
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
h
r
);
}
hr
=
CoMarshalInterface
(
data
->
stream
,
&
data
->
iid
,
data
->
object
,
MSHCTX_INPROC
,
NULL
,
data
->
marshal_flags
);
...
...
@@ -132,7 +130,7 @@ static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, M
static
void
end_host_object
(
DWORD
tid
,
HANDLE
thread
)
{
BOOL
ret
=
PostThreadMessageA
(
tid
,
WM_QUIT
,
0
,
0
);
ok
(
ret
,
"PostThreadMessage failed with error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"PostThreadMessage failed with error %
l
d
\n
"
,
GetLastError
());
/* be careful of races - don't return until hosting thread has terminated */
WaitForSingleObject
(
thread
,
INFINITE
);
CloseHandle
(
thread
);
...
...
@@ -373,7 +371,7 @@ static void test_dispex(void)
EXCEPINFO
excepinfo
;
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
stream
);
ok
(
hr
==
S_OK
,
"
got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
tid
=
start_host_object
(
stream
,
&
IID_IDispatchEx
,
(
IUnknown
*
)
dispex
,
MSHLFLAGS_NORMAL
,
&
thread
);
IDispatchEx_Release
(
dispex
);
if
(
tid
==
0
)
...
...
@@ -384,7 +382,7 @@ static void test_dispex(void)
IStream_Seek
(
stream
,
zero
,
STREAM_SEEK_SET
,
NULL
);
hr
=
CoUnmarshalInterface
(
stream
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
ok
(
hr
==
S_OK
,
"
got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
IStream_Release
(
stream
);
params
.
rgvarg
=
NULL
;
...
...
@@ -392,7 +390,7 @@ static void test_dispex(void)
params
.
cArgs
=
0
;
params
.
cNamedArgs
=
0
;
hr
=
IDispatchEx_InvokeEx
(
dispex
,
1
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_METHOD
,
&
params
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"
got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
params
.
rgvarg
=
args
;
params
.
rgdispidNamedArgs
=
NULL
;
...
...
@@ -404,23 +402,23 @@ static void test_dispex(void)
V_INTREF
(
&
args
[
1
])
=
&
i
;
i
=
0xbeef
;
hr
=
IDispatchEx_InvokeEx
(
dispex
,
2
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_METHOD
,
&
params
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"
got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
i
==
0xdead
,
"got %08x
\n
"
,
i
);
/* change one of the argument vts */
i
=
0xbeef
;
hr
=
IDispatchEx_InvokeEx
(
dispex
,
3
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_METHOD
,
&
params
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
DISP_E_BADCALLEE
,
"
got %08x
\n
"
,
hr
);
ok
(
hr
==
DISP_E_BADCALLEE
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IDispatchEx_InvokeEx
(
dispex
,
4
,
LOCALE_SYSTEM_DEFAULT
,
0xffff
,
&
params
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"
got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
params
.
cArgs
=
0
;
hr
=
IDispatchEx_InvokeEx
(
dispex
,
5
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_METHOD
,
&
params
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"
got %08x
\n
"
,
hr
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IDispatchEx_InvokeEx
(
dispex
,
5
,
LOCALE_SYSTEM_DEFAULT
,
DISPATCH_METHOD
,
&
params
,
NULL
,
&
excepinfo
,
NULL
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"
got %08x
\n
"
,
hr
);
ok
(
excepinfo
.
scode
==
E_OUTOFMEMORY
,
"got scode %
08x
\n
"
,
excepinfo
.
scode
);
ok
(
hr
==
DISP_E_EXCEPTION
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
excepinfo
.
scode
==
E_OUTOFMEMORY
,
"got scode %
#lx.
\n
"
,
excepinfo
.
scode
);
ok
(
excepinfo
.
pfnDeferredFillIn
==
NULL
,
"got non-NULL pfnDeferredFillIn
\n
"
);
IDispatchEx_Release
(
dispex
);
...
...
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