Commit Graph

2392 Commits

Author SHA1 Message Date
Huw Davies bf5dca1976 ole32: The type of the size of IMalloc'ed blocks is SIZE_T.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-20 01:50:47 +09:00
Paul Gofman d3b42a13d2 ole32/tests: OleGetClipboard should succeed when COM/OLE is not inited.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 23:52:35 +09:00
Paul Gofman 5d4b23e6e7 ole32: Zero output interface pointer in OleGetClipboard() on error.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 23:52:20 +09:00
Paul Gofman b4b0c138fe ole32: Fix behaviour of OLE init/uninit.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-15 23:51:02 +09:00
Nikolay Sivov 0a34f25487 ole32/tests: A couple of tests for ReadClassStm/ReadClassStg.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-06 18:08:32 +01:00
Nikolay Sivov 8fe18a16f7 ole32: Properly implement OleRegGetUserType().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-05 17:52:49 +01:00
Alexandre Julliard 3c84cc1807 ole32: Remove a no longer used constant.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-29 17:51:59 +01:00
Piotr Caban d90ec79be2 ole32: Make clipboard latest_snapshot access thread safe.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-29 17:18:15 +01:00
Nikolay Sivov d66af9c185 ole32/tests: Simple test for aggregation in CreateDataCache().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 13:44:50 +01:00
Nikolay Sivov 88111ca2c0 ole32/tests: Remove some casts we don't need, fix a couple of others.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 13:44:40 +01:00
Nikolay Sivov b19ad3af80 ole32: Use OleRun() in OleCreate() instead of unrolling what it does.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 13:44:31 +01:00
Nikolay Sivov 73008a6c04 ole32: Ignore GetMiscStatus() returned value in OleCreate().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 13:44:25 +01:00
Nikolay Sivov 7ad896d541 ole32/tests: Some tests for OleRegGetUserType().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-24 13:44:03 +01:00
Nikolay Sivov 98505b4076 ole32: Simplify OleRegGetUserType() using existing helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:35:40 +01:00
Nikolay Sivov 1219abfd8c ole32: Simplify OleRegGetMiscStatus() using existing helper, use read-only key permissions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:35:31 +01:00
Nikolay Sivov 12d73316e4 ole32: Fix parameter validation for CoGetMalloc().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:35:19 +01:00
Piotr Caban d7e302b52b ole32: Fix apartment window class name.
TestStand 2010 makes class name comparison when pumping RPC messages.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-21 19:50:27 +01:00
Piotr Caban 726698ab81 ole32: Fix minimal size check of compound file in StgOpenStorage.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-10 22:44:43 +09:00
Nikolay Sivov f797f63d24 ole32/tests: Some tests for CoGetMalloc().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-04 21:56:18 +09:00
Andrey Gusev 8bfc9bd2ee Assorted typos fixes.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-27 15:38:30 +09:00
Jacek Caban a1cc980bcb ole32: Use absolute key path in create_classes_root_hkey.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-18 00:29:45 +09:00
Jacek Caban 80c53b33fd ole32: Added DECLSPEC_HOTPATCHABLE to a few more functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-13 11:52:58 +09:00
Dmitry Timoshkov 2d08613e87 ole32: Add more traces to the storage methods.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-04 14:41:38 +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 b8800c237b ole32/tests: Add some tests for loading and drawing various OLE formats.
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:02:20 +09:00
Jacek Caban e4bc220802 ole32: Make CoInitializeEx hot patchable.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 00:33:27 +09:00
Dmitry Timoshkov 263b06ef8d ole32/tests: Add the tests to show that IEnumSTATSTG::Next should zero out returned stats when it reaches end of enumeration.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-02 23:02:24 +09:00
Dmitry Timoshkov 9f2bd8503d ole32: Zero out returned stats when IEnumSTATSTG::Next reaches end of enumeration.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-02 23:02:24 +09:00
Dmitry Timoshkov 7bc1005f56 ole32: Handle failure of reading directory entry in IEnumSTATSTG::Next.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-02 23:02:24 +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
Huw Davies 28b916b26e ole32: Fix ref counting in GetDataHere Proxy.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-28 00:58:15 +09:00
Huw Davies ced5800b99 ole32: Correctly release an existing pointer when unmarshalling a NULL-ptr.
However, this should not be done in the case of pUnkForRelease.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-28 00:58:15 +09:00
Huw Davies 9021b96772 ole32/tests: Release the marshalled data in the expected buffers.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-28 00:58:14 +09:00
Huw Davies 6aa797e669 ole32: WdtpInterfacePointer_UserUnmarshal() should release an interface if one is passed in.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-28 00:58:14 +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
Jacek Caban c5b54b34e9 ole32: Call CoCreateInstanceEx from CoCreateInstance instead of the other way around.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-22 16:47:19 +09:00
Jacek Caban dedcd30cb8 ole32: Pass requested interface IID to CreateInstance in CoCreateInstanceEx.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-22 16:47:15 +09:00
Huw Davies cc1b2879e4 ole32: Set the release interface to NULL before calls to GetDataHere.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 21:57:22 +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
Nikolay Sivov 4afda020ae ole32/tests: Use BOOL variables for BOOL return type (PVS-Studio).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 00:25:34 +09:00
Dmitry Timoshkov f9bc636d35 ole32: PropVariantCopy should return DISP_E_BADVARTYPE in case of bad source variant type.
In some rare (notably for some VT_VECTOR) cases Windows implementation
returns STG_E_INVALIDPARAMETER, but returning DISP_E_BADVARTYPE should
cover most of cases.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 00:25:33 +09:00
Huw Davies 5ae2b5ae93 ole32: Release interfaces as part of Stop.
This can now be done as Stop will no longer be called from within an object call.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-15 00:53:19 +09:00
Huw Davies 719c479a36 ole32: Defer calling Stop in an OnClose notification during an object call.
The OnClose notification may arrive during a call to the object.  Releasing the
object's interfaces at this point would be bad, so delay this until after the
object call returns.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-15 00:53:19 +09:00
Huw Davies 79598c4803 ole32: Call the cache's OnRun and OnStop methods.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-15 00:53:18 +09:00
Huw Davies e4ec89f2b0 ole32: Return OLE_E_NOTRUNNING on a cache-miss when the object isn't running.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-15 00:53:18 +09:00
Huw Davies 4fcc5fec57 ole32: Always use object_is_running to check whether the object is running.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-14 20:36:55 +09:00
Huw Davies a56a0eb063 ole32: Rewrite _Run() to return early on failure.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-14 20:36:43 +09:00
Huw Davies afbb4afc6c ole32: Silence an incorrect fixme.
The remote unknown object should not implement IExternalConnection.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-14 12:43:28 +09:00
Huw Davies 1dcf3f8e0a ole32/tests: Test calling CoDisconnectObject from within a COM call to the object.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-14 12:43:21 +09:00
Huw Davies 327100fef9 ole32: Don't block inside CoDisconnectObject.
This may be called inside a COM call to the object.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-14 12:43:17 +09:00