[PATCH 0/2] MR157: win32u/clipboard: Set bitmap and palette as system object.
Huw Davies (@huw)
wine at gitlab.winehq.org
Wed Jun 1 07:44:10 CDT 2022
Huw Davies (@huw) commented about dlls/user32/tests/clipboard.c:
>
> + r = open_clipboard( hwnd );
> + ok( r, "Open clipboard failed: %#lx.\n", GetLastError() );
> + r = EmptyClipboard();
> + ok( r, "EmptyClipboard failed: %#lx.\n", GetLastError() );
> +
> + bitmap = CreateBitmap( 10, 10, 1, 1, NULL );
> + h = SetClipboardData( CF_BITMAP, bitmap );
> + ok( h == bitmap, "Expected bitmap %p, got %p.\n", bitmap, h );
> + ok( !!DeleteObject( bitmap ), "DeleteObject failed.\n" );
> + h = GetClipboardData( CF_BITMAP );
> + ok( h == bitmap, "Expected bitmap %p, got %p.\n", bitmap, h );
> + memset( &bmi, 0, sizeof(bmi) );
> + bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
> + result = GetDIBits( GetDC( 0 ), h, 0, 0, NULL, &bmi, 0 );
> + todo_wine ok( !!result && result != ERROR_INVALID_PARAMETER, "GetDIBits failed: %#lx.\n", GetLastError() );
I doubt `GetDIBits()` returns `ERROR_INVALID_PARAMETER`, that's likely a mistake in msdn and probably refers to the result of calling `GetLastError()`. Just testing for a non-zero return should be fine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/157#note_1457
More information about the wine-devel
mailing list