gdi32: Make the bitmap test pass under Windows 2000. Take 2

Dmitry Timoshkov dmitry at codeweavers.com
Tue Apr 22 09:43:52 CDT 2008


"Paul Vriens" <paul.vriens.wine at gmail.com> wrote:

>>      SetLastError(0xdeadbeef);
>> -    hbmp = CreateBitmap(0x7ffffff, 1, 1, 1, NULL);
>> -    ok(hbmp != 0, "CreateBitmap should not fail\n");
>> +    hbmp = CreateBitmap(0x7fff, 0x7fff, 1, 1, NULL);
>> +    ok(hbmp != 0, "CreateBitmap error %u\n", GetLastError());
>>      DeleteObject(hbmp);
>>  
> 
> Hi Dmitry,
> 
> This one will fail at least on my VMware box. Shouldn't the test (and it's 
> confirmed by James and me) include something like:
> 
> ok(hbmp!=0 || (hbmp == 0 && GetLastError() == ERROR_NOT_ENOUGH_MEMORY), ....)

Why will it fail? According to James (and you confirmed it):

> The maximum values for both width and height on win2k is 32767.
> Anything above that on either parameter returns
> ERROR_INVALID_PARAMETER.  Both params can be 32767 at the same time
> and the call will still succeed (assuming there's enough memory left).

-- 
Dmitry.



More information about the wine-devel mailing list