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

Paul Vriens paul.vriens.wine at gmail.com
Tue Apr 22 10:03:29 CDT 2008


Dmitry Timoshkov wrote:
> "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).
> 
It's that last piece: "assuming there's enough memory left".

-- 
Cheers,

Paul.



More information about the wine-devel mailing list