Commit ef08bd76 authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Clear last error in EnumClipboardFormats.

parent 64fba3e3
......@@ -738,6 +738,7 @@ UINT WINAPI EnumClipboardFormats(UINT wFormat)
SetLastError(ERROR_CLIPBOARD_NOT_OPEN);
return 0;
}
SetLastError( 0 );
return USER_Driver->pEnumClipboardFormats(wFormat);
}
......
......@@ -680,16 +680,30 @@ static void test_synthesized(void)
r = OpenClipboard( NULL );
ok(r, "gle %d\n", GetLastError());
SetLastError( 0xdeadbeef );
cf = EnumClipboardFormats(0);
ok( cf == CF_UNICODETEXT, "cf %08x\n", cf );
ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() );
SetLastError( 0xdeadbeef );
cf = EnumClipboardFormats(cf);
ok( cf == CF_TEXT, "cf %08x\n", cf );
ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() );
SetLastError( 0xdeadbeef );
cf = EnumClipboardFormats(cf);
ok( cf == CF_OEMTEXT, "cf %08x\n", cf );
ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() );
SetLastError( 0xdeadbeef );
cf = EnumClipboardFormats(cf);
ok( cf == CF_LOCALE, "cf %08x\n", cf );
ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() );
SetLastError( 0xdeadbeef );
cf = EnumClipboardFormats( 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();
ok(r, "gle %d\n", GetLastError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment