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
18419dab
Commit
18419dab
authored
May 08, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Fix the clipboard format test on Win64.
parent
43f5b64f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
usrmarshal.c
dlls/ole32/tests/usrmarshal.c
+7
-2
No files found.
dlls/ole32/tests/usrmarshal.c
View file @
18419dab
...
...
@@ -94,22 +94,27 @@ static void test_marshal_CLIPFORMAT(void)
MIDL_STUB_MESSAGE
stub_msg
;
RPC_MESSAGE
rpc_msg
;
unsigned
char
*
buffer
;
ULONG
size
;
ULONG
i
,
size
;
CLIPFORMAT
cf
=
RegisterClipboardFormatA
(
"MyFormat"
);
CLIPFORMAT
cf2
;
init_user_marshal_cb
(
&
umcb
,
&
stub_msg
,
&
rpc_msg
,
NULL
,
0
,
MSHCTX_DIFFERENTMACHINE
);
size
=
CLIPFORMAT_UserSize
(
&
umcb
.
Flags
,
0
,
&
cf
);
ok
(
size
==
8
+
sizeof
(
cf_marshaled
)
||
broken
(
size
==
12
+
sizeof
(
cf_marshaled
))
||
/* win64 adds 4 extra (unused) bytes */
broken
(
size
==
8
+
sizeof
(
cf_marshaled
)
-
2
),
/* win9x and winnt don't include the '\0' */
"CLIPFORMAT: Wrong size %d
\n
"
,
size
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
memset
(
buffer
,
0xcc
,
size
);
init_user_marshal_cb
(
&
umcb
,
&
stub_msg
,
&
rpc_msg
,
buffer
,
size
,
MSHCTX_DIFFERENTMACHINE
);
CLIPFORMAT_UserMarshal
(
&
umcb
.
Flags
,
buffer
,
&
cf
);
ok
(
*
(
LONG
*
)(
buffer
+
0
)
==
WDT_REMOTE_CALL
,
"CLIPFORMAT: Context should be WDT_REMOTE_CALL instead of 0x%08x
\n
"
,
*
(
LONG
*
)(
buffer
+
0
));
ok
(
*
(
DWORD
*
)(
buffer
+
4
)
==
cf
,
"CLIPFORMAT: Marshaled value should be 0x%04x instead of 0x%04x
\n
"
,
cf
,
*
(
DWORD
*
)(
buffer
+
4
));
ok
(
!
memcmp
(
buffer
+
8
,
cf_marshaled
,
size
-
8
),
"Marshaled data differs
\n
"
);
ok
(
!
memcmp
(
buffer
+
8
,
cf_marshaled
,
min
(
sizeof
(
cf_marshaled
),
size
-
8
)),
"Marshaled data differs
\n
"
);
if
(
size
>
sizeof
(
cf_marshaled
)
+
8
)
/* make sure the extra bytes are not used */
for
(
i
=
sizeof
(
cf_marshaled
)
+
8
;
i
<
size
;
i
++
)
ok
(
buffer
[
i
]
==
0xcc
,
"buffer offset %u has been set to %x
\n
"
,
i
,
buffer
[
i
]
);
init_user_marshal_cb
(
&
umcb
,
&
stub_msg
,
&
rpc_msg
,
buffer
,
size
,
MSHCTX_DIFFERENTMACHINE
);
CLIPFORMAT_UserUnmarshal
(
&
umcb
.
Flags
,
buffer
,
&
cf2
);
...
...
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