gdi32/tests: Take into account several Win9x bugs in GetObject(). (take 3)

Francois Gouget fgouget at free.fr
Thu Jun 5 09:24:25 CDT 2008


On Thu, 5 Jun 2008, Paul Vriens wrote:

> Francois Gouget wrote:
> > ---
> > 
> > This time without the bug that caused tests to fail in Wine and on Windows
> > XP.
> > 
> >  +    SetLastError(0xdeadbeef);
> >      ret = GetBitmapBits(hbm, 0, NULL);
> > -    ok(ret == bm.bmWidthBytes * bm.bmHeight, "%d != %d\n", ret,
> > bm.bmWidthBytes * bm.bmHeight);
> > +    gle=GetLastError();
> > +    ok(ret == bm.bmWidthBytes * bm.bmHeight || (ret == 0 && gle ==
> > ERROR_INVALID_PARAMETER /* Win9x */), "%d != %d\n", ret, bm.bmWidthBytes *
> > bm.bmHeight);
> 
> Any reason this one isn't put into a broken() for win9x (as you did with all
> the others).

Because the MSDN says:

   If the function succeeds, the return value is the number of bytes 
   copied to the buffer.
   If the function fails, the return value is zero. 

So according to that Win9x does the right thing and it even makes some 
sense. Thus it seems wrong to mark it as broken. Yet NT4 and greater 
always return the number of bytes that _would_ have been copied to the 
buffer...

-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
                  Hiroshima '45 - Czernobyl '86 - Windows '95



More information about the wine-devel mailing list