user32: Clear last error in EnumClipboardFormats.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
64fba3e396
commit
ef08bd7675
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue