Commit Graph

137 Commits

Author SHA1 Message Date
Robert Shearman f8a2edb805 - Split up apartment creation so that the long code paths that don't
need locking no longer have locking.
- Add special cases for the threads that join apartments but can't
  increase the refcount of the apartment.
- Free TLS storage on thread destruction (including releasing the
  apartment the thread is in, if any, and so making another test
  pass).
2005-02-08 13:42:15 +00:00
Alexandre Julliard 2a46702761 Authors: Mike Hearn <mh@codeweavers.com>, Robert Shearman <rob@codeweavers.com>
- Rework RPC dispatch layer to be simpler and not get confused by
  server/client duality.
- Make threads shut down at the right time and not access freed memory
  after apartment destruction.
- Rename stub_dispatch_thread to client_dispatch_thread.
- Add some more tracing
- Check return value of WaitNamedPipe.
- Change named pipe timeouts to 0.5s, which should be enough for even the slowest machines.
2005-02-08 12:55:26 +00:00
Robert Shearman e6afc84873 - Add code for destroying the thread-local storage data, but don't use
it yet.
- Don't release apartment on changing modes because we didn't add a
  reference anywhere.
- Quieten the RPC_E_DISCONNECTED error message as it is an expected
  return code.
- Treat IID_NULL the same as IID_IUnknown.
- Make tests compile on Win95 again.
- Fix copy+paste error where the test failure should be from the
  CoUnmarshalInterface function.
2005-02-01 14:18:10 +00:00
Robert Shearman 9dba3479c8 Release the client security objects when no longer needed (reported by
Mike McCormack).
2005-01-28 17:19:51 +00:00
Robert Shearman 9b634b97ae - More tests.
- Change return code of CoGetPSClsid to match test result.
- Do a slight hack to make IRemUnknown proxies be added after the
  proxy that uses them to stop them being used after they are
  destroyed.
- Fix multiple local server connections.
2005-01-28 12:39:13 +00:00
Robert Shearman 41d9aef7ef - Implement CoSetProxyBlanket, CoQueryProxyBlanket and CoCopyProxy.
- Update todo list.
2005-01-28 11:27:46 +00:00
Robert Shearman cbbf08a7e2 - Use InterlockedIncrement for the ipid counter instead of a critical
section (suggested by Mike Hearn).
- Remove a line added by a bad merge.
- Implement RemUnkStub_Disconnect.
- Remove all of the RPC disconnect code.
2005-01-26 20:53:06 +00:00
Robert Shearman ad34f3dc5e - Generate machine-local IPIDs.
- Make pipes be uniquely identified only by their IPID.
2005-01-25 10:57:24 +00:00
Robert Shearman 717eb8fff4 - Consolidate more stub creation details into register_ifstub.
- Replace the current wine_marshal_id structure with STDOBJREF for the
  on-the-wire format.
2005-01-20 10:35:46 +00:00
Robert Shearman 4c8d59dd91 Implement table marshaling. 2005-01-17 13:39:40 +00:00
Robert Shearman 0e18914481 - Add documentation for most Co* functions.
- Move several functions into different files to group them with
  similar functions.
2005-01-14 17:05:36 +00:00
Robert Shearman a84e7d7b75 Destroy stubs on apartment shutdown. 2005-01-14 15:11:55 +00:00
Christian Costa a010e3b3fa CoInitialize(Ex) should return S_FALSE when COM is already initialized
for the current thread.
2005-01-12 19:58:09 +00:00
Robert Shearman 452491bd03 - Document CoSetState & CoGetState.
- Rewrite them to only retrieve TLS info once.
- Remove trailing whitespace in COM_CurrentInfo.
2005-01-12 19:48:39 +00:00
Robert Shearman 36f482cb7d - Make MTA dynamically allocated so that proxies and other resources
are freed at the proper time.
- Changed/removed some incorrect comments regarding apartments.
2005-01-12 19:27:04 +00:00
Bill Medland 9c6de52bb2 Corrected testing for multithreaded (based upon observations by Paul
Vriens, Christian Costa and Robert Shearman).
Added TRACE for investigating OXID errors.
2005-01-11 15:45:03 +00:00
Robert Shearman 23e390a223 - Make struct oletls ref counted so that it is only detached from the
apartment on the final CoUninitialize.
- Decrease the size of the crit sec on destroying an apartment - it is
  only needed for touching the apartment list.
- Small cleanups.
2005-01-06 19:39:07 +00:00
Mike Hearn a6a416cb4e - Make apartment access thread-safe by introducing refcounting and
wider usage of the apartment lock.
- Rework OLE TLS management to eliminate uninitialised apartments and
  parent chaining.
2005-01-05 17:14:33 +00:00
Mike Hearn 73318dab8f Add a DCOM todo list. 2005-01-04 20:32:47 +00:00
Robert Shearman 2835633789 Implement proxy manager. 2005-01-04 11:58:23 +00:00
Robert Shearman 2b747d4e50 Implement COM local servers using table marshaling to avoid doing the
marshaling in a child thread where COM has not been initialized.
2004-12-27 19:24:55 +00:00
Mike Hearn 5475a2e617 - Implement the COM stub manager, refactor the current stub code.
- Begin implementing interface stubs.
2004-12-27 19:21:47 +00:00
Mike Hearn 737e67b17b Propagate apartments through the intermediate threads, make listener
thread apartment scoped.
2004-12-27 16:59:28 +00:00
Eric Pouech bcfa5b0900 ReadFile and WriteFile must be passed a parameter for the number of
handled bytes when no overlapped operation is done.
2004-12-22 18:38:31 +00:00
Robert Shearman 2fa9a0a6fd Remove unneeded includes and the unused COMPOBJ_hInstance32 variable. 2004-12-14 15:28:58 +00:00
Eric Pouech 4056d7ef8c Fixed some errors in function prototypes. 2004-12-13 21:19:01 +00:00
Mike Hearn 36aee71988 Rename the STUBMGR thread to more accurately reflect its purpose. 2004-12-07 17:01:40 +00:00
Robert Shearman 3b0a5d0a06 - Add some function declarations to objbase.h.
- Add stubs for server ref counting.
- Implement HRESULT marshaling.
2004-12-01 15:33:34 +00:00
Eric Pouech 0a258964c2 Const correctness fixes. 2004-11-30 21:38:57 +00:00
Mike Hearn a153efc5bb - Improve OLE function documentation.
- Bail out with CO_E_NOTINITIALIZED when apt is null.
2004-11-29 17:00:15 +00:00
Dmitry Timoshkov c41d0c9a4b - Remove bogus use of nStatCounter and hOleAut32 in CoSetState.
- Remove a comment about protecting per thread data by a critical section.
2004-10-25 21:48:44 +00:00
Francois Gouget 3bb5b093e8 Assorted spelling fixes. 2004-10-22 22:27:51 +00:00
Robert Shearman 0fb8f4a15e Improve proxy destruction comment. 2004-10-18 19:34:51 +00:00
Francois Gouget 486d020c1b Don't define COBJMACROS in objbase.h.
Update the Wine sources accordingly.
2004-10-07 03:06:48 +00:00
Mike McCormack 37dcaf6be6 CoSuspendClassObjects stub implementation. 2004-09-20 21:44:34 +00:00
Mike McCormack d324ccfce7 Fix some warnings found with -Wsign-compare. 2004-09-07 20:25:52 +00:00
Mike Hearn 819942339f Disconnect proxies at COM shutdown to release the corresponding
stubs.
2004-08-02 18:28:29 +00:00
Mike Hearn ce335adddd Don't marshal IClassFactory into the local server pipe until we have
connected, otherwise we might end up with stubs that are never used.
2004-07-30 18:44:09 +00:00
Robert Shearman 0cac6c83a7 Fix some inaccuracies in a comment and reformat. 2004-07-29 02:43:48 +00:00
Mike Hearn 1cc05ff148 Pass -Embedding switch to EXE servers, more tracing. 2004-07-23 19:10:13 +00:00
Mike Hearn c019b89d5f Fix misleading warning ole CoGetClassObject. 2004-07-21 19:37:07 +00:00
Mike McCormack e42d8aef24 Fix a few serious race conditions in the OLE object pipe server. 2004-07-15 22:07:44 +00:00
Francois Gouget ca942f1625 Assorted spelling fixes. 2004-07-08 20:16:23 +00:00
Mike Hearn 17ad9fdd43 Add some explanations to compobj.c, implement flushing message queue
on shutdown.
2004-07-06 21:27:48 +00:00
Marcus Meissner e3a37c8a26 Revert broken strict aliasing fix. 2004-05-21 20:52:57 +00:00
Marcus Meissner ff39b877a4 Fixed strict aliasing issues in dlls/ole32. 2004-05-04 03:10:50 +00:00
Warren Turkal e910efbcbe Fixed the implementation of CoTreatAsClass. 2004-03-29 21:41:33 +00:00
Francois Gouget b948778660 Assorted spelling fixes. 2004-03-23 23:20:16 +00:00
Robert Shearman 2eee76703d - CoSetState info should be thread local.
- SetErrorInfo should allocate an apartment when no apartment present.
2004-02-10 01:36:20 +00:00
Alexandre Julliard d07c1004e3 Moved a few remaining 16-bit definitions out of the standard headers. 2004-01-23 22:51:41 +00:00