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

Paul Vriens at
Tue Apr 22 10:47:47 CDT 2008

Dmitry Timoshkov wrote:
> "Paul Vriens" < at> wrote:
>>>> 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() == 
>>> 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".
> That's a valid assumption I'd guess, and a lot of tests already rely
> on this: every thing which indirectly or directly allocates memory,
> creates windows, objects, processes, etc.
But the test doesn't cater for that.

If I run the test with several heights on my win2k box the maximum I can have is:

CreateBitmap(0x7fff,0x2e63, ...

before it fails with ERROR_NOT_ENOUGH_MEMORY.

This of course differs on every run. My point is that ERROR_NOT_ENOUGH_MEMORY is 
totally valid and should be catered for in the test otherwise we would still 
have failures for this test.



More information about the wine-devel mailing list