Kirill K. Smirnov : gdiplus: IPicture_SaveAsFile updates seek pointer, so put it back.

Alexandre Julliard julliard at winehq.org
Fri Oct 17 07:25:50 CDT 2008


Module: wine
Branch: master
Commit: e0325b098fc86145f94886b2f883b56f17e024aa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e0325b098fc86145f94886b2f883b56f17e024aa

Author: Kirill K. Smirnov <lich at math.spbu.ru>
Date:   Thu Oct 16 18:07:44 2008 +0400

gdiplus: IPicture_SaveAsFile updates seek pointer, so put it back.

---

 dlls/gdiplus/image.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index ffd270b..0cb5ded 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-cvs mailing list