Using 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: Micah N Gorrell mgorrell@codeweavers.com --- dlls/ole32/clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index 0c02d02a65..2ca05b8ea6 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -789,7 +789,7 @@ static HRESULT get_data_from_stream(IDataObject *data, FORMATETC *fmt, HGLOBAL *
offs.QuadPart = 0; IStream_Seek(med.u.pstm, offs, STREAM_SEEK_CUR, &pos); - IStream_Seek(med.u.pstm, offs, STREAM_SEEK_SET, NULL); + IStream_Seek(med.u.pstm, offs, STREAM_SEEK_END, NULL); hr = IStream_CopyTo(med.u.pstm, stm, pos, NULL, NULL); ReleaseStgMedium(&med); if(FAILED(hr)) goto error;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=59568
Your paranoid android.
=== debian10 (32 bit report) ===
ole32: clipboard.c:841: Test failed: expected 14 got 0 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00402419).
Report errors: ole32:clipboard crashed (c0000005)
=== debian10 (32 bit Chinese:China report) ===
ole32: clipboard.c:841: Test failed: expected 14 got 0 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00402419).
Report errors: ole32:clipboard crashed (c0000005)
=== debian10 (32 bit WoW report) ===
ole32: clipboard.c:841: Test failed: expected 14 got 0 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00402419).
Report errors: ole32:clipboard crashed (c0000005)
=== debian10 (64 bit WoW report) ===
ole32: clipboard.c:841: Test failed: expected 14 got 0 Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00402419).
Report errors: ole32:clipboard crashed (c0000005)