Commit Graph

635 Commits

Author SHA1 Message Date
Robert Shearman 8d6a673cf7 - Add error messages on failure in file moniker load function.
- Fix incorrect pointer check in both monikers.
- Fix max size calculation of item moniker to match native.
2005-05-23 10:27:42 +00:00
Robert Shearman 27d73d6115 - Add a useful trace message.
- Fix more places where custom header size was calculated exclusive of
  the data size member.
- Optimize custom marshaling by getting size before calling the custom
  marshaler so we can write the header before and not use a second
  stream.
2005-05-23 10:27:23 +00:00
Alexandre Julliard aebb745488 Comment out stub WEP entry points so that we can call WEP for builtin
dlls too.
2005-05-23 10:12:26 +00:00
Alexandre Julliard 0ddd30b0b6 Removed unnecessary code in the 16-bit DllEntryPoint function of some
dlls, and also fixed its ordinal in a few places.
2005-05-23 10:00:26 +00:00
Robert Shearman b9ecbb6167 - Marshal objects & monikers into the ROT.
- Test for this behaviour.
2005-05-23 09:54:53 +00:00
Kevin Koltzau bb4d6f88bf Implement Hash function on composite moniker. 2005-05-23 09:52:13 +00:00
Robert Shearman 34d3049360 - Add a generic moniker marshaler that works by saving & loading
monikers to & from the stream.
- Use the generic moniker marshal in the file & item monikers and add
  a class factory for each.
2005-05-19 14:22:14 +00:00
Robert Shearman a890293f33 - Change remaining blocks of code with 2-space indentation to 4-space
indentation.
- Make vtables const.
- Remove an unnecessary memcpy and let the compiler do the work.
2005-05-19 12:04:58 +00:00
Robert Shearman 447ab61288 Write custom header up to and including size, not excluding. 2005-05-19 11:15:50 +00:00
Robert Shearman 10ee7b36e8 Implement IROTData::GetComparisonData for file & item monikers. 2005-05-18 18:28:15 +00:00
Pierre d'Herbemont 49b1d335d9 Big Endian specific code fixes in order to conform with
NONAMELESSSTRUCT.
2005-05-18 09:44:13 +00:00
Juan Lang b45e31608b Obvious fixes to PropVariantClear and PropVariantCopy for vector
types.
2005-05-17 10:18:59 +00:00
Juan Lang ff87ad7ab1 Add a comment, and a no-op cleanup. 2005-05-16 21:37:54 +00:00
Juan Lang e140d02a2b Differentiate between version 0 and version 1 property storages. 2005-05-16 17:52:36 +00:00
Marcus Meissner f3d99b2697 Move the Dll init function to compobj.c to avoid having global
variables. Remove need of ole32_main.h.
2005-05-16 14:12:53 +00:00
Marcus Meissner fc61f6c553 Make _xmalloc16() static. 2005-05-16 08:47:40 +00:00
Marcus Meissner 81e2677939 Staticify FTMarshalImpl definition. 2005-05-16 08:47:26 +00:00
Marcus Meissner 45bc1c21a1 Make HGLOBALStream_* functions static. 2005-05-16 08:47:14 +00:00
Juan Lang 5d90f2bcf9 Store property names in the code page of the property set. 2005-05-16 08:43:35 +00:00
Jeff Latimer 72f73ac452 Implement the IEnumMoniker interface for the ROT and provide tests to
exercise the interface.
2005-05-14 18:50:14 +00:00
Juan Lang 2507264e05 - maintain proper byte order
- maintain PROPSETFLAG_ANSI flag based on codepage
- update comments
2005-05-14 11:06:44 +00:00
Mike McCormack a22c767eb0 Remove function prototypes. 2005-05-13 17:45:50 +00:00
Hans Leidekker 6b7676a1e8 Don't import from ntdll. 2005-05-13 17:42:49 +00:00
Mike McCormack e3b43fa458 Make sure a stream can't be created in read only storage. 2005-05-13 13:58:43 +00:00
Mike McCormack 912ffd6a0f Remove unnecessary declarations and make functions static. 2005-05-12 09:57:21 +00:00
Mike McCormack 2c6c67f4ea Make functions static and remove unnecessary declarations. 2005-05-11 15:56:45 +00:00
Mike McCormack 3c5790646f Add a stub implementation of CoIsHandlerConnected. 2005-05-11 12:57:16 +00:00
Mike McCormack 809cf354e4 Fix a memory leak in the ole storage implementation. 2005-05-10 15:59:59 +00:00
Alexandre Julliard 34fa35dc99 Added rules for building import libraries in the individual dll
makefiles, and added support for building a .def.a static import
library too.
2005-05-09 14:42:30 +00:00
Juan Lang 4d1562495d Correct/improve error checking in IPropertyStorage. 2005-05-09 09:26:43 +00:00
Alexandre Julliard d62356aa1e Added rules to build import libraries in the individual dll makefiles.
Generate import libraries with the right name right away instead of
using an intermediate .spec.def file.
2005-05-07 12:39:52 +00:00
Stefan Leichter cabe752d1d Make ole32 tests loadable on NT4. 2005-05-07 12:09:58 +00:00
Matthew Mastracci 6e028f414d Replace stub entry for StgOpenStorageEx with call to StgOpenStorage. 2005-05-06 14:32:30 +00:00
Matthew Mastracci 8188790946 Replace StgCreateStorageEx stub with call to StgCreateDocfile and add
required STGFMT_* enumerations.
2005-05-05 16:44:05 +00:00
Juan Lang b99dfb0c1a Define and use endian conversion macros for big-endian machines. 2005-04-24 17:22:26 +00:00
Juan Lang bf83ba1fa3 - convert strings between property storage's code page and system code
page
- add tests for setting code page
- fix tests and behavior to match WinXP
2005-04-23 19:04:49 +00:00
Stefan Leichter 950d678c5e Make ole32 tests loadable on NT4. 2005-04-22 19:05:51 +00:00
Francois Gouget 4b9f767845 Specify the proper call convention in the PropSysFreeString()
implementation.
2005-04-20 16:21:16 +00:00
Francois Gouget 3ef8c51c8a Tweak the API documentation to silence winapi_check warnings. 2005-04-20 15:18:42 +00:00
Dmitry Timoshkov 35356002e6 Zero out an invalidated runningObjectTableInstance pointer. 2005-04-15 16:11:29 +00:00
Juan Lang e68982fcaf Implement FmtIdToPropStgName & PropStgNameToFmtId, with tests. 2005-04-15 14:09:18 +00:00
Alexandre Julliard f7ff216a15 Fixed a buffer overflow. 2005-04-14 12:50:54 +00:00
Dimitrie O. Paun e3e5cf19a8 Remove the need for the non-standard (Close|Delete)MetaFile16(). 2005-04-13 15:16:40 +00:00
Juan Lang 142254d746 Implement PropSys{Alloc|Free}String, and support BSTRs in
PropVariant{Clear|Copy} using them.
2005-04-13 11:13:55 +00:00
Juan Lang c1fe67bc36 - add write support to IPropertyStorage, with tests
- misc. cleanups the tests turned up
2005-04-11 18:50:45 +00:00
Juan Lang 50794ce787 Add traces, add unit tests for IPropertyStorage, and fix the problems
they caught.
2005-04-11 14:30:24 +00:00
Mike McCormack 6714664dee Eliminate forward declarations, make functions static. 2005-03-31 15:26:30 +00:00
Francois Gouget 6b10c324c5 Assorted spelling fixes. 2005-03-30 17:08:31 +00:00
Huw Davies 9be7f2789f WriteFmtUserTypeStg doesn't pull a CLSID from the registry - it's
unclear when (if at all) this gets written.
2005-03-29 18:56:22 +00:00
Huw Davies e42a23d2d3 Don't close reg key if the open failed. 2005-03-29 13:06:57 +00:00
Vincent Béron c822566974 Change prototypes so gcc with some warnings doesn't bark. 2005-03-29 11:32:04 +00:00
Mike McCormack a63c2eb30b Remove function prototypes, make functions static. 2005-03-28 10:01:45 +00:00
Mike McCormack e19ce3bd40 Remove unnecessary function prototypes. 2005-03-27 18:16:49 +00:00
Mike McCormack 1ff3bf8e69 Remove function prototypes, make functions static. 2005-03-27 18:16:25 +00:00
Francois Gouget 93416cdaf7 Assorted spelling fixes. 2005-03-23 13:15:18 +00:00
Jakob Eriksson 461c830745 Eliminate HeapAlloc casts. 2005-03-22 18:26:06 +00:00
Jakob Eriksson 665b9ca377 More trace info from storage32 test. 2005-03-22 18:18:43 +00:00
Mike McCormack 17c3106896 Eliminate casts of the return value of HeapAlloc. 2005-03-21 11:25:13 +00:00
Vincent Béron 811725ac20 Correct and complete some api documentation. 2005-03-21 10:55:13 +00:00
Troy Rollo 963b63ecbd ix test for STGM_SHARE_EXCLUSIVE on nameless DocFiles. 2005-03-21 10:30:01 +00:00
Robert Shearman 1571df5722 Fix memory leak in OleDuplicateData on error path (found by Smatch). 2005-03-19 17:05:12 +00:00
Jon Griffiths dbf222f3aa Use LMEM_ flags for LocalAlloc(), not GMEM_ (GlobalAlloc). 2005-03-17 20:53:37 +00:00
Juan Lang be84f8d9e6 Begin implementing IPropertyStorage. 2005-03-17 20:50:35 +00:00
Robert Shearman 1b5ebabdce - Add critsec debugging info.
- Move the modal loop called during RPCs into CoWaitForMultipleHandles.
- Use a mutex for long remoting calls to IRemUnknown methods.
- Remove locking in apartment_disconnectproxies as it is not needed.
- Use PostMessage instead of SendMessage so we can run the message
  loop or not as appropriate.
2005-03-17 10:26:20 +00:00
Juan Lang ac24801db0 Add a comment about byte order, change types to reduce casting and not
cast away constness.
2005-03-17 10:25:13 +00:00
Joris Huizer 34a0463bca A few memory checks avoiding memory leaks. 2005-03-14 10:46:50 +00:00
Mike McCormack 77fc6a5d82 StgOpenStorage shouldn't open zero length storage files. 2005-03-11 13:17:10 +00:00
Robert Shearman 8971f06225 - Rename apartment functions to become more object-oriented.
- Rename register_ifstub to marshal_object to more accurately describe
  what it does.
- Add new function, apartment_getoxid, to prepare for a possible
  future patch where remoting is started on demand.
2005-03-11 10:19:10 +00:00
Juan Lang 23805995a6 Fix the calling convention of DllCanUnloadNow. 2005-03-10 17:25:02 +00:00
Mike McCormack 6f2f76c410 Shared reading of storage files requires STGM_TRANSACTED. 2005-03-09 11:44:59 +00:00
Robert Shearman 527ef47d70 Make each ifproxy have its own channel buffer to fix a bug where a
proxy with multiple interfaces could invoke the wrong stub buffer on
the server.
2005-03-07 17:14:11 +00:00
Mike McCormack e9d334d0c9 Fix more incorrect uses of STGM_ enumerations. 2005-03-07 12:24:42 +00:00
Juan Lang 01239efa4a Implement StgCreatePropSetStg. 2005-03-07 10:59:09 +00:00
Mike McCormack a7609ee155 Test and fix grfMode handling in StgOpenDocfile. 2005-03-05 10:48:11 +00:00
Alexandre Julliard 53f3d4c65a Authors: Rob Shearman <rob@codeweavers.com>, Mike Hearn <mh@codeweavers.com>
- Add re-entrancy tests to the test suite.
- Run RPCs on a new thread client side so we can pump the message
  loop.
2005-03-04 12:30:47 +00:00
Mike McCormack 607b43e6b4 Implement StgSetTimes. 2005-03-04 10:48:17 +00:00
Francois Gouget fbb3343547 Assorted spelling fixes. 2005-03-02 13:53:50 +00:00
Alexandre Julliard d0ee9f9309 Avoid spaces before preprocessor directives, that's not portable. 2005-03-02 12:23:20 +00:00
Juan Lang 4c8676cdbf Move vtbl to end of file and get rid of unnecessary prototypes. 2005-03-01 10:41:25 +00:00
Jon Griffiths eb5bf7dd38 Documentation spelling fixes. 2005-02-25 14:07:56 +00:00
Paul Vriens 8922da9ed4 Added some TRACE statements. 2005-02-25 13:58:37 +00:00
Mike McCormack db69dcb5c1 Add struct StorageBaseImpl at the start of derived structures instead
of trying to keep the first members the same.
2005-02-24 19:39:27 +00:00
Mike McCormack a6a91a440b Implement and test IPropertySetStorage. 2005-02-21 20:58:09 +00:00
Mike Hearn 4d49d8ca36 Avoid infinite loop when doing a typelib marshalled
IUnknown::QueryInterface by only doing an extra QI if requested IID is
not equal to marshalled IID.
2005-02-21 18:35:07 +00:00
Robert Shearman 4390d003f4 - Better tracing.
- Small cleanup of creation functions.
2005-02-18 20:13:23 +00:00
Robert Shearman 95288f9148 - Move marshaling state machine into stub manager from ifstub.
- Add additional needed states for table-weak marshaling, as shown by
  tests.
- Protect external reference count from underflows/overflows.
2005-02-18 20:03:23 +00:00
Robert Shearman 2d2a39cc42 - Use I_RpcGetBuffer, instead of our own buffer routines to fix an
occasional test crash caused by heap corruption.
- Zero the memory block passed to RpcServerRegisterIfEx so we don't
  pass garbage in some of the fields we don't fill in.
- Return the correct error code from create_server and fix two handle
  leaks.
- TODO update.
2005-02-15 21:48:09 +00:00
Robert Shearman 3b59fa8fce The Global Interface Table should do table-strong marshaling instead
of normal marshaling so that an interface can be retrieved more than
one time.
2005-02-15 15:47:44 +00:00
Robert Shearman 552cc7d5b3 - Remove cruft left over from previous RPC backend implementation in
the apartment structure.
- Don't pass an IPID by value for proxy_manager_create_ifproxy.
- Disable more of RPC_UnregisterInterface to prevent the RPC runtime
  using freed memory.
- Rename various external RPC backend functions so that they all have
  the same "RPC_" prefix.
- Reduce the timeout of the function that connects to a local server
  to 30s, like native.
2005-02-15 15:44:25 +00:00
Robert Shearman db6db7cb4c Make COM use the RPC runtime as the backend for RPC calls. Based on a
patch by Ove Kåven.
2005-02-15 15:02:49 +00:00
Robert Shearman 2ff1711487 Invoke objects in STA's in the correct thread by sending messages to
the hidden apartment window.
2005-02-14 11:50:51 +00:00
Marcus Meissner 30ed10004b Output some more informations.
Mark one global variable static.
2005-02-14 11:07:55 +00:00
Robert Shearman 403d8e23cd Make Ole tests run on Windows 95. 2005-02-14 11:01:51 +00:00
Robert Shearman 999766d31b - Implement CoDisconnectObject.
- Change CoLockObjectExternal so that it does the correct action now
  and eliminate a fair few lines of now redundant code.
- Rename OLE32_Dll{Register,Unregister}Server to
  Dll{Register,Unregister}Server.
2005-02-08 16:51:22 +00:00
Robert Shearman 514af6ce78 Move object-to-stub-manager mapping rule to register_ifstub. 2005-02-08 14:26:19 +00:00
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 b9aa9e0bdd - Pass the original IID to IMarshal_UnmarshalInterface and query for
the requested interface.
- Unmarshaling IID_NULL means use the IID the interface was originally
  marshaled with.
2005-02-02 19:11:23 +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 9a97360eba Remove test that fails on Win98 and is not useful. 2005-01-31 11:29:41 +00:00