Commit Graph

474 Commits

Author SHA1 Message Date
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
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
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 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
Jacek Caban 38a9a232f7 ole32: Use get_stub_manager_from_object in CoDisconnectObject. 2015-09-04 19:29:29 +09:00
Jacek Caban e5edbc6fa0 ole32: Use proper IUnknown implementation when finding and creating stub manager. 2015-08-29 14:28:22 +09:00
Piotr Caban fbf7046ae8 ole32: Don't pump all messages in CoWaitForMultipleHandles in threads without apartment window. 2015-07-30 23:50:43 +02:00
Nikolay Sivov 961b1a270f ole32: Remove a couple of interface casts. 2015-04-06 12:09:17 +09:00
Francois Gouget f505e6fb4a Assorted spelling fixes. 2015-03-19 21:54:14 +09:00
Francois Gouget 7fe0600237 ole32: Remove unneeded NONAMELESSXXX directives. 2015-03-17 14:18:54 +09:00
Qian Hong a940718a4d ole32: Make CoUninitialize and OleUninitialize hotpatchable. 2015-01-16 16:52:25 +01:00
Sebastian Lackner f6f55058e4 ole32: Don't process window events when APC calls are queued. 2014-11-21 20:10:04 +09:00
Sebastian Lackner bbf6891030 ole32: Verify arguments for CoWaitForMultipleHandles, always initialize index to zero. 2014-11-21 20:10:01 +09:00
Akihiro Sagawa efdaa4a17a ole32: Search 32-bit registry in 64-bit CoGetPSClsid and vice versa. 2014-07-15 15:34:40 +02:00
Akihiro Sagawa 414398c1e7 ole32: Add KEY_WOW64 support in wrapper registry functions. 2014-07-15 15:33:59 +02:00
Andrew Eikum c2089cbd0d ole32: Respect TreatAs in CoCreateInstance. 2014-06-16 09:28:38 +02:00
Andrew Eikum 42f5118570 ole32: Implement CoTreatAsClass for classes without AutoTreatAs. 2014-06-16 09:28:29 +02:00
Guillaume Charifi 216b24527d ole32: CoCreateGuid returns E_INVALIDARG on null-GUID. 2014-06-12 18:23:33 +02:00
Frédéric Delanoy 2e5cb7aac8 Assorted spelling/grammar fixes. 2014-04-30 18:34:20 +02:00
Daniel Lehman cdc03fa9b8 ole32: Make some COM functions hot-patchable. 2014-03-05 11:48:13 +01:00
Stefan Dösinger 97569e4e4a ole32: Make CoCreateInstance hookable for Steam. 2014-03-03 17:46:47 +01:00
Nikolay Sivov e593c3068c ole32: Remove ERR() output that's not really helpful. 2014-02-11 19:19:13 +01:00
Nikolay Sivov 747c649d99 ole32: Use precomposed table for GUID from string conversion. 2014-02-11 19:19:13 +01:00
Nikolay Sivov cdd932a060 ole32: Separate IIDFromString() for CLSIDFromString(), fix corner cases and return values. 2014-02-10 10:42:57 +01:00
Nikolay Sivov d1c4871012 ole32: Use CoTaskMemAlloc() instead of IMalloc directly. 2014-02-10 10:42:29 +01:00
Nikolay Sivov 62d9b5a0e0 ole32: Implement CoGetInstanceFromIStorage(). 2014-02-07 11:05:14 +01:00
Nikolay Sivov 35f218c39e ole32: Implement CoGetInstanceFromFile(). 2014-02-06 17:08:14 +01:00
Nikolay Sivov 3b6d06e33c ole32: Trace library path to be added to list. 2013-12-04 11:07:29 +01:00
Nikolay Sivov d0bf7f4eaf ole32: Added activation context support for OleRegGetMiscStatus(). 2013-11-11 20:56:20 +01:00
Nikolay Sivov cd6e41dd9a ole32: Use real object CLSID when creating instance from context info. 2013-11-01 14:17:55 +01:00
Nikolay Sivov 0af3bd8365 ole32: Support activation context in CLSIDFromProgID(). 2013-10-25 11:12:31 +02:00
Nikolay Sivov f96631e110 ole32: Add a helper to map ProgID to CLSID using registry. 2013-10-25 11:12:27 +02:00
Nikolay Sivov 03dbbe2103 ole32: Support activation context in ProgIDFromCLSID(). 2013-10-22 16:37:41 +02:00
Nikolay Sivov e02b1687aa ole32: Support activation context redirection in CoGetPSClsid(). 2013-10-22 16:37:40 +02:00
Nikolay Sivov af93b53082 ole32: Support registration-free COM in CoGetClassObject(). 2013-10-21 20:23:55 +02:00
Alexandre Julliard d67b99aef2 ole32: Delay registering the apartment class until needed. 2013-10-17 20:29:21 +02:00
Nikolay Sivov 98f3ecc32a ole32: GIT can be released on process detach only. 2013-08-23 10:41:24 +02:00
Nikolay Sivov ba999f05e1 ole32: Test HRESULT values using proper success code. 2013-08-20 12:01:38 +02:00
Nikolay Sivov 2f21130f2e ole32: Fix standard GIT initialization. 2013-08-20 12:01:35 +02:00
Jacek Caban 889112a29a ole32: Use a separated object to expose local servers instead of marshaling them in CoRegisterClassObject. 2013-05-23 20:03:17 +02:00
Alexandre Julliard 5e95368e0a ole32: Don't bother to unregister classes at process exit. 2013-05-14 11:33:27 +02:00
Dmitry Timoshkov 79ef449e32 ole32: Add a semi-stub for CLSIDFromProgIDEx. 2013-05-07 11:18:52 +02:00
Nikolay Sivov 611cf6bb0d ole32: Fix possible return of freed pointer (Coverity). 2013-04-01 12:32:37 +02:00
Marcus Meissner 2dbb23c810 ole32: Free *ppszProgID on error path (Coverity). 2013-02-18 10:32:22 +01:00
Alexandre Julliard e089295f75 ole32: Fix wrap-around bug in tick count comparison. 2013-01-24 15:15:25 +01:00
Andrew Talbot fa96beb5c4 ole32: Indentation fix. 2012-12-19 12:54:41 +01:00
Alexandre Julliard a283b986c7 ole32: Limit the number of messages processed at once in CoWaitForMultipleObjects. 2012-12-12 14:06:46 +01:00
Hans Leidekker 7895eae15b ole32: Convert the remaining RegCreateKey and RegOpenKey calls to the wrappers. 2012-11-26 16:59:22 +01:00
Hans Leidekker a82c49028d ole32: Use wrappers around NT functions to access the registry in CoGetPSClsid. 2012-11-26 16:59:17 +01:00
Tatyana Fokina 9d4fcaf2bb ole32: Removed unused parametrs keyname and valuename in COM_RegReadPath. 2012-11-05 11:41:29 +01:00
Alistair Leslie-Hughes 939b1bbe21 ole32: Add CoGetDefaultContext stub. 2012-09-20 19:53:25 +02:00
Jacek Caban c6793a2e27 ole32: Added ISynchronizeHandle implementation. 2012-08-13 16:28:49 +02:00
Jacek Caban 153b94b3c5 ole32: Use proper helpers for iface calls. 2012-08-13 16:28:48 +02:00
Michael Stefaniuc 43ae84636a ole32: Avoid TRUE:FALSE conditional expressions. 2012-08-13 11:50:42 +02:00
Alexandre Julliard 2736d28064 ole32: Add a NULL pointer check in CoDisconnectObject. 2012-05-14 18:24:19 +02:00
Alexandre Julliard 0f3e60747f ole32: Process all pending messages in CoWaitForMultipleHandles before waiting again, otherwise we may not wake up. 2011-11-29 21:22:40 +01:00
Francois Gouget ed03674bc3 ole32: Delete the compobj and rpc static critical sections when unloading the dll. 2011-11-17 11:37:56 +01:00
David Hedberg a0980b47c8 ole32: Add ManualResetEvent implementation. 2011-05-30 17:55:43 +02:00
David Hedberg ea14a6b2e7 oleaut32: Fix CLSIDToString behaviour when passed an invalid CLSID-string.
In some cases, Excel 2007 apparently relies on CLSIDToString properly
parsing an "invalid" CLSID string where extra bytes are appended.
2011-04-28 18:17:18 +02:00
Alexandre Julliard 8c2a9414a6 ole32: Cleanup return value handling in CoWaitForMultipleHandles. 2011-01-21 14:51:37 +01:00
Maarten Lankhorst 75801f095d ole32: Handle alertable wait in CoWaitForMultipleHandles. 2011-01-21 14:44:48 +01:00
Michael Stefaniuc 32fe620c88 ole32: Use ifaces instead of vtbl pointers in Context. 2010-12-09 12:23:49 +01:00
Alexandre Julliard 431e369f62 ole32: Convert dll registration to the IRegistrar mechanism. 2010-12-03 19:51:08 +01:00
Nikolay Sivov 2c80e14eec ole32: Use window property to store registered drop target. 2010-05-18 08:53:08 +02:00
Mikhail Maroukhine f930c87fd6 objbase.h: CLSIDFromString: Add constness to the parameters declaration in accordance with MSDN. 2010-03-29 12:11:02 +02:00
Vincent Povirk 975c820fce ole32: Don't register an IMallocSpy object when the ole trace is used.
There's no need for this. Any useful information we could get out of it
is availble from the olemalloc channel, and it means that the ole channel
changes behavior in a way that's visible to programs.
2010-03-22 10:47:47 +01:00
Nikolay Sivov 825a635692 ole32: Turn FIXME to TRACE for CoGetTreatAsClass. 2010-03-16 17:04:15 +01:00
Alexandre Julliard 44a9bae9f8 ole32: Fix some pointer cast warnings on 64-bit. 2009-12-09 12:04:01 +01:00
Rob Shearman 510ed24f9a ole32: Cope with double quotes in paths for libraries to be loaded from the registry. 2009-11-30 12:48:05 +01:00
Rob Shearman 9943facb26 ole32: Fix error code returned by CoGetClassObject/CoCreateInstance in CLSCTX_REMOTE_SERVER case. 2009-11-24 10:52:07 +01:00
Rob Shearman 24cccbf4d1 ole32: Add inproc handler object creation support for CoCreateInstance. 2009-11-24 10:46:12 +01:00
Rob Shearman d963e97f32 ole32: Objects registered as local servers don't need to support IClassFactory. 2009-11-20 16:38:56 +01:00
Nikolay Sivov 5b723235d8 ole32: Check source pointer in StringFromGUID2. 2009-10-06 11:57:20 +02:00
Francois Gouget 3cbeae820d ole32: Make apartment_addref() static. 2009-07-07 11:16:26 +02:00
Francois Gouget f8afcdbb7c ole32: Reorder some compobj functions to avoid forward declarations. 2009-07-07 11:16:22 +02:00
Hans Leidekker 6986d97f18 ole32: Use existing MTA in CoGetContextToken and CoGetObjectContext. 2009-07-03 13:06:17 +02:00
Hans Leidekker b9be397024 ole32: Implement CoGetContextToken. 2009-06-23 15:52:37 +02:00
Alexandre Julliard c98ce23fd2 ole32: Get rid of line feeds and tabs in traces. 2009-06-09 17:01:14 +02:00
Vincent Povirk b49d541cb5 ole32: Process sent and DDE messages in CoWaitForMultipleHandles. 2009-05-20 10:54:26 +02:00
Hans Leidekker bd4975acb0 ole32: Use existing MTA in CoGetClassObject and CoCreateInstance.
Custom actions in the CS3 installer depend on this.
2009-05-05 14:14:20 +02:00
Aric Stewart 46da8ef18b ole32: CoGetTreatAsClass should return S_FALSE if it cannot even find the key for the requested CLSID. 2009-04-24 11:51:35 +02:00
Alexandre Julliard 7b6dd2c9f8 ole32: Get rid of WINE_StringFromCLSID and A->W conversions. 2009-03-12 13:09:52 +01:00
Alexandre Julliard 6b40f64e18 ole32: Make compobj.dll into a stand-alone 16-bit module. 2009-03-12 13:09:31 +01:00
Rob Shearman d974922698 ole32: Fix a memory leak in an error path in COMPOBJ_DllList_Add. 2009-03-09 12:04:35 +01:00
Andrey Turkin 644220b518 ole32: Prevent recursion when CLSIDFromString is passed empty string. 2009-01-20 12:23:11 +01:00
Andrey Turkin d0a345f914 ole32: Add a few fields to OLE TLS area to match native memory layout. 2009-01-19 14:46:02 +01:00
Andrey Turkin a06f568a2a ole32: Add CoGetCallContext and CoSwitchCallContext implementations. 2009-01-19 14:44:32 +01:00
Andrey Turkin 37d27c38ce ole32: Add IContextCallback interface to context object. 2009-01-15 12:42:12 +01:00
Alexandre Julliard 16b5e6b9b5 ole32: Register interfaces through dlldata.c as far as possible. 2008-12-02 20:52:09 +01:00
Maarten Lankhorst 08c78e07a9 ole32: Fix releasing spy. 2008-11-28 12:56:47 +01:00
Maarten Lankhorst 92dca953d9 ole32: Add Co*InitializeSpy functions. 2008-11-26 13:44:36 +01:00
Francois Gouget 66063ae4a4 ole32: Remove WINAPI on static functions where not needed. 2008-11-26 12:33:13 +01:00
Rob Shearman de03fe3c0f ole32: Update comments in compobj.c. 2008-09-16 22:33:14 +02:00
Michael Karcher 75bf84e60b ole32/compobj: Fix function name in comment. 2008-09-15 11:31:33 +02:00
Rob Shearman 064b6fce0c ole32: Fix testing of HRESULT types with not operator instead of comparing against S_OK.
This makes it more obvious what the code is doing.
2008-08-18 17:34:12 +02:00
Lei Zhang c7ce692d13 ole32: Silence FIXME from CoGetContextToken stub. 2008-07-22 13:03:18 +02:00
Alexandre Julliard a803fa3578 ole32: Make the apartment window a HWND_MESSAGE window. 2008-06-26 13:22:16 +02:00
Alexandre Julliard d324c42b4c ole32: Don't consider RPC_S_UUID_LOCAL_ONLY an error in CoCreateGuid.
Return a proper HRESULT for other errors.
2008-06-24 11:50:42 +02:00
Rob Shearman 8580198dc8 ole32: Keep track of the number of weak references to an object.
This is so that an object will only be released when a weak-reference is 
used after the last weak reference has been released (either by 
CoReleaseMarshalData or CoUnmarshalInterface + Release).
2008-04-29 12:35:26 +02:00
Austin English c531e2abdb Spelling fixes. 2008-04-23 12:31:07 +02: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
Francois Gouget 29ef0b90ee Assorted spelling, punctuation and case fixes. 2008-03-03 12:04:48 +01:00
Alexandre Julliard de61fc5eca ole32: Added a CoGetContextToken stub. 2008-02-26 11:21:54 +01:00
Rob Shearman bfa6ddaeb7 ole32: Fix a potentially confusing combination of conditional and bitwise or operators by adding extra brackets. 2008-02-13 16:42:36 +01:00
Rob Shearman a10cf16449 ole32: Remove an assert that is useless and triggers warnings elsewhere in static analysis tools. 2008-02-13 16:42:30 +01:00
Rob Shearman e0d25c6394 ole32: Fix local-variable shadowing in apartment_hostobject_thread. 2008-02-13 16:42:23 +01:00
Gerald Pfeifer 76e7cc9423 ole32: Remove one noop check in CoWaitForMultipleHandles(). 2008-01-02 12:38:42 +01:00
Alexander Dorofeyev 188ef4e4f9 ole32: Fix wrong timeout check. 2007-12-24 13:30:56 +01:00
Lei Zhang d5e78c84c7 ole32: Print a fixme when an aggregation attempt fails. 2007-12-14 12:25:14 +01:00
Rob Shearman 31b2d81ea0 ole32: Ignore the threading model of the PSFactoryBuffer object created during standard marshaling.
This is so that we don't try to host it.
2007-12-03 11:55:00 +01:00
Rob Shearman f65e04770d ole32: Always create a window for the main apartment. 2007-12-03 11:54:16 +01:00
Rob Shearman d881005c4f ole32: Release the stream in COM_RevokeRegisteredClassObject. 2007-11-13 13:29:38 +01:00
Rob Shearman 433639f783 ole32: Free the memory associated with the open DLL list on unloading of ole32. 2007-11-12 11:46:23 +01:00
Rob Shearman 23dc7b6a67 ole32: Implement CoGetObjectContext. 2007-11-02 12:18:45 +01:00
Francois Gouget f76bea09d4 ole32: Fix the CoCreateGuid() ordinal in the documentation. 2007-10-15 14:06:25 +02:00
Damjan Jovanovic b9bdb2a6c2 ole32: Implement win16 COCREATEGUID. 2007-10-01 14:16:57 +02:00
Rob Shearman 97f389451d ole32: Fix the default unload delay to depend on the threading model of the component loaded. 2007-09-12 14:04:59 +02:00
Rob Shearman 5ffe867dc7 ole32: Implement CoFreeUnusedLibrariesEx.
Fix CoFreeUnusedLibraries to use a delay of 10 minutes when used with 
multi-threaded apartments.
2007-09-12 14:04:56 +02:00
Rob Shearman d845022819 ole32: Remove some dead code.
CoFreeUnusedLibraries doesn't do anything and COM_FlushMessageQueue 
won't actually allow any RPCs to be processed as the apartment has 
already been destroyed.
2007-07-16 22:46:45 +02:00
Andrew Talbot 66b05dde02 ole32: Constify some variables. 2007-06-29 14:30:48 +02:00
Dmitry Timoshkov 3c9e7a7f33 wine: Switch to using 'long' for INT_PTR type for 64-bit compatibility. 2007-05-25 20:37:56 +02:00
Rob Shearman be55a4bbe2 ole32: Fix hosting in main apartments.
The recently introduced code had a bug where it passed the wrong
values into apartment_findfromtype to find the main apartment. Since
this is now the only way the function is used, fix this bug by
changing apartment_findfromtype to apartment_findmain, which only
finds the main apartment.
2007-05-21 12:38:54 +02:00
Rob Shearman 600143d4fa ole32: Create host apartments to enable isolation of objects of incompatible threading models.
There should be one host apartment per apartment. Existing apartments 
should not be re-used, except in the case of the main apartment.
2007-05-18 14:42:37 +02:00
Rob Shearman ed79ddab1d ole32: Don't lookup the address for the DllGetClassObject function for ole32.dll in the apartment loaded dll list.
Call the function directly for a small performance boost.
2007-05-14 14:26:22 +02:00
Rob Shearman 70e8842924 ole32: Fix CoUninitialize to only free libraries that return S_OK from DllCanUnloadNow. 2007-05-14 14:26:17 +02:00
Rob Shearman 314f9fe509 ole32: Add documentation about registered class objects only being visible in the apartment in which they were registered. 2007-05-08 13:23:57 +02:00
Rob Shearman 7d7f9a59d0 ole32: Fix CoRevokeClassObject to return RPC_E_WRONG_THREAD if it was called from a different apartment than the one that called CoRegisterClassObject. 2007-05-08 13:23:51 +02:00
Rob Shearman 23e43d886e ole32: Split CoRevokeClassObject into a separate function, COM_RevokeRegisteredClassObject, which acts on a RegisteredClass object. 2007-05-08 13:23:40 +02:00
Rob Shearman 51f85a765b ole32: COM_GetRegisteredClassObject should only retrieve objects that were registered in the current apartment. 2007-05-08 13:23:30 +02:00
Rob Shearman d76ab14479 ole32: Revoke registered class objects when the apartment they were registered in is destroyed, not when the last CoUninitialize is called. 2007-05-08 13:22:50 +02:00
Rob Shearman af2c349685 ole32: CoGetClassObject shouldn't return REGDB_E_KEYMISSING, so convert it to REGDB_E_CLASSNOTREG. 2007-05-08 13:22:23 +02:00
Rob Shearman c582136d0b ole32: Remove an unnecessary QueryInterface in CoRegisterClassObject that CoMarshalInterface will already do. 2007-05-02 15:03:28 +02:00
Rob Shearman 63ea015c65 ole32: Don't release the registered drop targets in OleUninitialize.
Do it in DLL_PROCESS_DETACH instead.
2007-04-05 13:25:18 +02:00
Rob Shearman ab7f796fcb ole32: Keep a list of the loaded dlls for each apartment.
Use it to make CoFreeUnusedLibraries per-apartment.
2007-04-04 21:28:36 +02:00
Rob Shearman 30721a88e3 ole32: Cache the address for the library's DllGetClassObject and DllCanUnloadNow in the OpenDll list entry. 2007-04-04 21:28:01 +02:00
Rob Shearman c40f1b6659 ole32: Move the handling of loading a dll and getting an in-process object from it to an apartment-specific function.
Use it to implement apartment_hostobject in a cleaner way so that it is 
guaranteed to not recurse.
2007-04-04 21:27:07 +02:00
Rob Shearman 679bfdab28 ole32: Move the in-process module loading to COMPOBJ_DllList_Add. 2007-04-04 21:26:53 +02:00
Rob Shearman 247255568c ole32: Convert the OpenDll list to a standard Wine list.
Store the library name and make it reference counted.
2007-04-04 21:26:47 +02:00
Rob Shearman f8789122aa ole32: Implement MkParseDisplayName. 2007-03-28 12:12:49 +02:00
Rob Shearman 2514c0141e ole32: Move GetClassFile to moniker.c and move OleRun to ole2.c. 2007-03-27 13:00:44 +02:00
Rob Shearman 8e0145242b ole32: Add documentation for CoGetClassObject and GetClassFile. 2007-03-27 13:00:29 +02:00
Rob Shearman 3acb0a878d ole32: The 16-bit version of CoDisconnectObject is not compatible with the 32-bit version, so create a separate stub for the former. 2007-03-21 15:55:22 +01:00
Huw Davies a8c72b76cf ole32: Only retrieve posted and paint messages in an STA message loop. 2007-03-13 11:52:41 +01:00
Rob Shearman f0189b8789 ole32: Implement CoAddRefServerProcess and CoReleaseServerProcess. 2007-03-09 21:17:47 +01:00
Rob Shearman 789f344c2b ole32: Make RegisteredClass list into a standard Wine list. 2007-03-09 21:17:42 +01:00
Rob Shearman 15a0b7fad5 ole32: Don't keep the local server named pipe open for a single-use object. 2007-03-09 21:16:44 +01:00
Rob Shearman 880542a9f8 ole32: Close the named pipe after revoking local server objects. 2007-03-09 21:16:37 +01:00
Rob Shearman c826515e55 ole32: REGCLS_MULTIPLEUSE implies CLSCTX_INPROC_SERVER in CoRegisterClassObject. 2007-03-09 21:16:31 +01:00