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

This commit is contained in:
Kirill K. Smirnov 2008-10-16 18:07:44 +04:00 committed by Alexandre Julliard
parent 9d5139f4d9
commit e0325b098f
1 changed files with 7 additions and 0 deletions
dlls/gdiplus

View File

@ -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))