Commit Graph

92 Commits

Author SHA1 Message Date
Nikolay Sivov fde61d467a ole32: Fix CreataDataCache() return value when requested riid is not IUnknown, for aggregation case.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 22:23:31 +09:00
Dmitry Timoshkov 39d2ce5956 ole32: Relax media type check when loading CF_METAFILEPICT format from OLE storage.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 22:14:04 +09:00
Dmitry Timoshkov 421b3ca3eb ole32: Fallback to parsing the Presentation streams ff parsing of the "CONTENTS" stream fails.
I have an application that tries to load an existing object from the file
using OleLoad() and fails because the "CONTENTS" stream has clsid set to
"Microsoft Photo Editor 3.0 Picture". I've dumped the contents of the OLE
storage to disk for investigation, and under Windows (where Microsoft Photo
Editor is not installed, and registry has no traces of its class guids)
OleLoad() is able to load objects from this storage, and after that OleDraw()
successfully paints the object contents on the screen. I've written an
application to play with the dumped storage, and under Windows the "CONTENTS"
stream also can't be loaded, but the storage also contains the "OlePres000"
stream which contains an object in CF_METAFILEPICT format, and this one can be
loaded and painted.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-29 21:20:07 +09:00
Dmitry Timoshkov 1b580e70e9 ole32: Print a FIXME when the "CONTENTS" stream refers to unsupported format.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-23 19:20:25 +09:00
Dmitry Timoshkov b9d8c2b1ea ole32: Initialize number of bytes read before the comparison.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 19:19:08 +09:00
Huw Davies 94ee4096ec ole32: Add a stub for OleCreateFromFileEx.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-09 19:17:02 +09:00
Huw Davies b0deb315a0 ole32: Implement QueryGetData(). 2015-03-25 19:45:58 +09:00
Huw Davies b4cd2c4dbb ole32: Add support for drawing the dib format. 2015-03-25 19:45:55 +09:00
Huw Davies e410f273cd ole32: Add support for retrieving extents of dib format. 2015-03-25 19:45:52 +09:00
Huw Davies bbba2c00aa ole32: Add support for loading dibs. 2015-03-25 19:45:48 +09:00
Huw Davies 547fd746bb ole32: Separate metafile loading into a helper function. 2015-03-25 19:45:42 +09:00
Huw Davies 480c10cce9 ole32: Add support for parsing the 'CONTENTS' stream. 2015-03-25 19:45:36 +09:00
Huw Davies d864387aaa ole32: Split the data loading into a couple of helpers. 2015-03-25 19:45:31 +09:00
Huw Davies a4e3668f3f ole32: A cache entry should hold the stream its data is from, not the top-level storage. 2015-03-25 19:45:10 +09:00
Huw Davies c5e020c5b5 ole32: Read the class id from the top-level storage object.
The cache_entries' storages are just references to the same object anyway.
2015-03-25 19:44:59 +09:00
Nikolay Sivov 3376648224 ole32/datacache: Handle stream Stat() failure (PVS-Studio). 2015-03-19 16:56:05 +09:00
Francois Gouget 7fe0600237 ole32: Remove unneeded NONAMELESSXXX directives. 2015-03-17 14:18:54 +09:00
Jacek Caban 153b94b3c5 ole32: Use proper helpers for iface calls. 2012-08-13 16:28:48 +02:00
Michael Stefaniuc feba7c37b4 ole32: Use ifaces instead of vtbl pointers in DataCache. 2010-12-23 13:47:27 +01:00
Huw Davies abf8da6727 ole32: Implement OnRun and OnStop. 2010-11-01 16:16:12 +01:00
Huw Davies 6b05b2a927 ole32: Remove some useless comments. 2010-11-01 16:16:05 +01:00
Huw Davies 96ab42728d ole32: Re-order some functions. 2010-11-01 16:15:57 +01:00
Huw Davies c41c05057c ole32: Rename cache entry parameters from 'This' - it leads to too much confusion with the data cache itself, which is the real COM object. 2010-11-01 16:15:49 +01:00
Huw Davies 4d137e4702 ole32: Add a stub advise sink object to the data cache. 2010-11-01 16:15:38 +01:00
Huw Davies 250b55c41d ole32: Call the draw_continue function. 2010-09-28 17:33:17 +02:00
Michael Stefaniuc ffac31da09 ole32: Use IsEqualIID instead of memcmp to compare REFIIDs. 2010-07-23 11:46:29 +02:00
Nikolay Sivov 1b0182f9bb ole32: Use IsEqualIID() instead of memcmp(). 2010-07-21 17:38:37 +02:00
Nikolay Sivov 5185409144 ole32: Remove redundant variables. 2010-07-21 17:38:37 +02:00
Rob Shearman add909a021 ole32: Release the storage object in DataCache_Destroy. 2009-11-29 16:40:12 +01:00
Michael Stefaniuc 0449701c31 ole32: Remove superfluous pointer casts. 2009-02-11 12:29:56 +01:00
Austin English 1b24da3aa0 ole32: Spelling fixes. 2008-04-10 09:51:12 +02:00
Andrew Talbot 4971f2f687 ole32: Assign to structs instead of using memcpy. 2008-03-11 12:11:51 +01:00
Eric Pouech 528ad9ebbd ole32: Fixed datacache object so that we can retrieve meaningful information. 2008-01-14 13:38:46 +01:00
Rob Shearman 5d2f802359 ole32: Validate the parameters to DataCache_Cache. 2007-11-13 23:28:05 +01:00
Rob Shearman 1dc91c41a7 ole32: Initialise data_cf in DataCacheEntry's to zero to indicate no data present on creation. 2007-11-12 11:46:15 +01:00
Rob Shearman 8f6218a7c8 ole32: Fix a memory leak in DataCacheEntry_Save. 2007-11-12 11:46:06 +01:00
Rob Shearman cc30255c8a ole32: Support reading and writing custom clipformats in the data cache. 2006-12-18 11:45:42 +01:00
Francois Gouget f0ccd389d4 ole32: Convert dump_FORMATETC() into debugstr_formatetc(), a proper debug trace function. 2006-12-06 12:14:55 +01:00
Rob Shearman 878d5e9cec ole32: Implement the GetData function of the data cache to using the
existing LoadData function and fix GetData to also return data that
has been set, rather than loaded.
2006-12-04 20:19:28 +01:00
Rob Shearman 1b244baf48 ole32: Fix HandsOffStorage in the data cache. 2006-12-04 20:19:03 +01:00
Rob Shearman 6235ac9f58 ole32: Implement the DiscardCache function in the data cache. 2006-12-04 20:18:56 +01:00
Rob Shearman feee099eec ole32: Add some more traces to the data cache to make debugging easier. 2006-12-04 13:51:15 +01:00
Rob Shearman ca81b825be ole32: In the data cache, fmtetc->cfFormat and fmtetc->tymed can be 0 which means to match any clipformat/tymed.
Therefore, keep the clipformat of the data in the data_cf field.
Return an error from SetData if a non-zero clipformat hasn't been specified.
Write out stgmedium.tymed instead of fmtetc.tymed, which is guaranteed 
to be non-zero if data has been set.
2006-12-04 13:51:06 +01:00
Rob Shearman d37b669503 ole32: Check that the specified clipboard format and tymed are valid in IOleCache::Cache in the data cache. 2006-12-04 13:44:06 +01:00
Rob Shearman 587ba29174 ole32: Implement saving of the data cache.
Document a few of the unknown fields in the presentation data header.
2006-12-04 12:21:20 +01:00
Rob Shearman e5c82d3aa4 ole32: Add handling of the dirty state to the data cache and fix InitNew to not call Load. 2006-12-04 12:21:09 +01:00
Rob Shearman e9cc0744cc ole32: Add documentation for CreateDataCache. 2006-12-04 12:20:57 +01:00
Rob Shearman 4b7e8e73a4 ole32: The advise sink for the data cache should be primed with the passed in aspects value, not an arbitrarily selected value. 2006-12-04 12:20:41 +01:00
Rob Shearman 46f70207b2 ole32: Implement the SetData function for the data cache. 2006-12-04 12:20:36 +01:00
Rob Shearman 25d7d95035 ole32: Load cached data in the data cache into a STGMEDIUM type so it can be treated the same as set data. 2006-12-04 12:20:28 +01:00