gdiplus: IPicture_SaveAsFile updates seek pointer, so put it back.
Kirill K. Smirnov
lich at math.spbu.ru
Thu Oct 16 09:07:44 CDT 2008
This patch fixes gdiplus test failures revealed by patch:
[2/3] oleaut32: return correct error code
http://www.winehq.org/pipermail/wine-patches/2008-October/063221.html
-------------- next part --------------
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 9516d64..c6b56bd 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -253,6 +253,7 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage)
IStream* stream;
HRESULT hr;
INT size;
+ LARGE_INTEGER move;
TRACE("%p, %p\n", image, cloneImage);
@@ -279,6 +280,12 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage)
goto out;
}
+ /* Set seek pointer back to the beginning of the picture */
+ move.QuadPart = 0;
+ hr = IStream_Seek(stream, move, STREAM_SEEK_SET, NULL);
+ if (FAILED(hr))
+ goto out;
+
hr = OleLoadPicture(stream, size, FALSE, &IID_IPicture,
(LPVOID*) &(*cloneImage)->picture);
if (FAILED(hr))
More information about the wine-patches
mailing list