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
ef08bd76
Commit
ef08bd76
authored
Sep 09, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Clear last error in EnumClipboardFormats.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
64fba3e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
clipboard.c
dlls/user32/clipboard.c
+1
-0
clipboard.c
dlls/user32/tests/clipboard.c
+14
-0
No files found.
dlls/user32/clipboard.c
View file @
ef08bd76
...
@@ -738,6 +738,7 @@ UINT WINAPI EnumClipboardFormats(UINT wFormat)
...
@@ -738,6 +738,7 @@ UINT WINAPI EnumClipboardFormats(UINT wFormat)
SetLastError
(
ERROR_CLIPBOARD_NOT_OPEN
);
SetLastError
(
ERROR_CLIPBOARD_NOT_OPEN
);
return
0
;
return
0
;
}
}
SetLastError
(
0
);
return
USER_Driver
->
pEnumClipboardFormats
(
wFormat
);
return
USER_Driver
->
pEnumClipboardFormats
(
wFormat
);
}
}
...
...
dlls/user32/tests/clipboard.c
View file @
ef08bd76
...
@@ -680,16 +680,30 @@ static void test_synthesized(void)
...
@@ -680,16 +680,30 @@ static void test_synthesized(void)
r
=
OpenClipboard
(
NULL
);
r
=
OpenClipboard
(
NULL
);
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
cf
=
EnumClipboardFormats
(
0
);
cf
=
EnumClipboardFormats
(
0
);
ok
(
cf
==
CF_UNICODETEXT
,
"cf %08x
\n
"
,
cf
);
ok
(
cf
==
CF_UNICODETEXT
,
"cf %08x
\n
"
,
cf
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
cf
=
EnumClipboardFormats
(
cf
);
cf
=
EnumClipboardFormats
(
cf
);
ok
(
cf
==
CF_TEXT
,
"cf %08x
\n
"
,
cf
);
ok
(
cf
==
CF_TEXT
,
"cf %08x
\n
"
,
cf
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
cf
=
EnumClipboardFormats
(
cf
);
cf
=
EnumClipboardFormats
(
cf
);
ok
(
cf
==
CF_OEMTEXT
,
"cf %08x
\n
"
,
cf
);
ok
(
cf
==
CF_OEMTEXT
,
"cf %08x
\n
"
,
cf
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
cf
=
EnumClipboardFormats
(
cf
);
cf
=
EnumClipboardFormats
(
cf
);
ok
(
cf
==
CF_LOCALE
,
"cf %08x
\n
"
,
cf
);
ok
(
cf
==
CF_LOCALE
,
"cf %08x
\n
"
,
cf
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
cf
=
EnumClipboardFormats
(
cf
);
cf
=
EnumClipboardFormats
(
cf
);
ok
(
cf
==
0
,
"cf %08x
\n
"
,
cf
);
ok
(
cf
==
0
,
"cf %08x
\n
"
,
cf
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"wrong error %u
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
cf
=
EnumClipboardFormats
(
0xdead
);
ok
(
cf
==
0
,
"cf %08x
\n
"
,
cf
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"wrong error %u
\n
"
,
GetLastError
()
);
r
=
EmptyClipboard
();
r
=
EmptyClipboard
();
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
ok
(
r
,
"gle %d
\n
"
,
GetLastError
());
...
...
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