[3/3] ole32: Use a shortcut in DataCache_Save only if fSameAsLoad set to TRUE.
dmitry at baikal.ru
Thu Oct 19 02:52:11 CDT 2017
Huw Davies <huw at codeweavers.com> wrote:
> No, this isn't a typo. The idea is to copy the loaded storage to a
> fresh storage that is passed when fSameAsLoad is FALSE.
> I'm aware that there are issues related to the storage handling
> in both the cache and the default handler. That's on my list
> of things to look into, but feel free to investigate further.
I just sent some tests for data cache behaviour when saving a loaded
storage, and according to the tests the cache should not blindly copy
the whole original storage (i.e. should not call IStorage_CopyTo) in
its Save implementation. Moreover it looks like the cache never saves
"Contents" streams, and saves only very first "OlePres" stream it has
encountered for special storage classes. I'm attaching a preliminary
patch that removes the IStorage_CopyTo optimization and solves some
of the new tests. What is more important for me this patch also fixes
the application that I have here (it's an OLE control that creates data
cache storage with custom content, it uses MFC and according to MFC
sources it doesn't expect to see "Contents" streams after OleSave()).
What do you think?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the wine-devel