Commit e3f8f30a authored by Nathan Beckmann's avatar Nathan Beckmann Committed by Alexandre Julliard

gdiplus: Return an error for consecutive GdipLockBitmapBit calls.

parent eabc62db
...@@ -114,8 +114,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect, ...@@ -114,8 +114,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
if(flags & ImageLockModeUserInputBuf) if(flags & ImageLockModeUserInputBuf)
return NotImplemented; return NotImplemented;
if((bitmap->lockmode & ImageLockModeWrite) || (bitmap->lockmode && if(bitmap->lockmode)
(flags & ImageLockModeWrite)))
return WrongState; return WrongState;
IPicture_get_Handle(bitmap->image.picture, &hbm); IPicture_get_Handle(bitmap->image.picture, &hbm);
......
...@@ -214,10 +214,8 @@ static void test_LockBits(void) ...@@ -214,10 +214,8 @@ static void test_LockBits(void)
/* read x2 */ /* read x2 */
stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd); stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd);
expect(Ok, stat); expect(Ok, stat);
todo_wine { stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd);
stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd); expect(WrongState, stat);
expect(WrongState, stat);
}
stat = GdipBitmapUnlockBits(bm, &bd); stat = GdipBitmapUnlockBits(bm, &bd);
expect(Ok, stat); expect(Ok, stat);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment