Commit e08eb410 authored by Micah N Gorrell's avatar Micah N Gorrell Committed by Alexandre Julliard

ole32: Obtain stream size regardless of current position.

Use STREAM_SEEK_END when attempting to determine the size of a stream that clipboard data has just been rendered into. This corrects an issue with Office 2016 where the current position of the stream is 0 while rendering a target of image/png. Signed-off-by: 's avatarMicah N Gorrell <mgorrell@codeweavers.com> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 404cee2a
......@@ -788,7 +788,7 @@ static HRESULT get_data_from_stream(IDataObject *data, FORMATETC *fmt, HGLOBAL *
if(FAILED(hr)) goto error;
offs.QuadPart = 0;
IStream_Seek(med.u.pstm, offs, STREAM_SEEK_CUR, &pos);
IStream_Seek(med.u.pstm, offs, STREAM_SEEK_END, &pos);
IStream_Seek(med.u.pstm, offs, STREAM_SEEK_SET, NULL);
hr = IStream_CopyTo(med.u.pstm, stm, pos, NULL, NULL);
ReleaseStgMedium(&med);
......
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