Commit Graph

566 Commits

Author SHA1 Message Date
Michael Stefaniuc 56b87f3a0f janitorial: Remove redundant NULL checks before calling HeapFree wrappers. 2006-10-16 10:52:48 +02:00
Francois Gouget 4794dc0e38 rpcrt4: Add RPC_CSTR, RPC_WSTR and update the prototypes accordingly. 2006-10-13 11:54:58 +02:00
Ge van Geldorp d642e11438 winapi_test: Regenerate tests.
Remove structs from test list which have preprocessor directives in
their definitions (winapi_test can't handle that).
2006-10-11 12:12:21 +02:00
Michael Stefaniuc 14c551bc3a rpcrt4/tests: Win64 printf format warning fixes. 2006-10-09 12:44:16 +02:00
Francois Gouget 82babbee0b Add missing '\n's to Wine traces. 2006-10-05 17:46:48 +02:00
Robert Shearman 2324aeec33 rpcrt4: Use I_Rpc{Allocate, Free} instead of Heap{Alloc, Free} as that
the former are exported by rpcrt4 seemingly to allow callers of tower
functions to free the allocated memory.
2006-10-03 16:14:57 +02:00
Robert Shearman 7dab87e2e9 rpcrt4: RpcBindingCopy is implemented. 2006-10-03 16:14:49 +02:00
Robert Shearman b9423076ba rpcrt4: Don't use HEAP_ZERO_MEMORY when most of the fields will be initialised to non-zero values. 2006-10-03 16:14:47 +02:00
Francois Gouget 1011bc47bf rpcrt4: Don't return void values. This fixes Visual C++ warnings. 2006-10-02 11:54:43 +02:00
Francois Gouget 68e84a7a53 Add missing '\n's to ok() calls. 2006-09-29 17:53:39 +02:00
Michael Stefaniuc 85ce5117c5 Add a WINE_NO_LONG_INT define to many makefiles to ease the transition of DWORD/LONG/ULONG from long to int. 2006-09-29 16:08:30 +02:00
Thomas Weidenmueller bc0f9c49b0 rpcrt4: Fix RpcMgmtSetServerStackSize prototype. 2006-09-28 14:03:50 +02:00
Andrew Talbot 8221beb225 rpcrt4: Cast-qual warnings fix. 2006-09-26 11:40:52 +02:00
Andrew Talbot 3f123e51bf rpcrt4: Cast-qual warnings fix. 2006-09-26 11:40:47 +02:00
Andrew Talbot 269f77d872 rpcrt4: Cast-qual warnings fix. 2006-09-26 11:40:41 +02:00
Andrew Talbot 7147f79153 rpcrt4: Cast-qual warnings fix. 2006-09-26 11:40:33 +02:00
Alexandre Julliard 32ab895e46 makefiles: Generate the dependencies line to avoid some code duplication. 2006-09-14 09:38:16 +02:00
Francois Gouget 06f9532dda Assorted spelling fixes. 2006-09-08 11:04:53 +02:00
Robert Shearman a6e545a27c rpcrt4: Raise an exception if IRpcChannelBuffer_GetBuffer fails.
Make StdProxy_GetIID and StdProxy_GetChannel return void.
Don't bother checking for This and pRpcChannelBuffer being NULL as 
native doesn't.
2006-09-07 11:42:05 +02:00
Huw Davies bd9891ffed rpcrt4: Add delegating stub support. 2006-09-07 10:57:39 +02:00
Huw Davies b058e6e729 rpcrt4: Add infrastructure to create and manage a variable sized vtbl
that will be used as the server object for delegated stubs.
2006-09-07 10:57:27 +02:00
Huw Davies 9b91307677 rpcrt4: Tests on NdrCStdStubBuffer_Release to show that we shouldn't call Disconnect.
Also call IPSFactoryBuffer_Release on the 2nd arg, rather than on This->pPSFactory.
2006-09-07 10:24:54 +02:00
Huw Davies 86aa95fd2b rpcrt4: Tidy up CStdStubBuffer_QueryInterface. 2006-09-07 10:23:00 +02:00
Huw Davies dffd3e5034 rpcrt4: Tidy up CStdStubBuffer_AddRef,Release. 2006-09-07 10:22:35 +02:00
Robert Shearman ada61620de rpcrt4: Make the reference counting in the standard proxy thread-safe. 2006-09-07 10:19:38 +02:00
Robert Shearman 3e01da1838 rpcrt4: Fix NdrStubGetBuffer to use the IRpcChannelBuffer object since
IRpcChannelBuffer_GetBuffer may put extra data onto the wire for ORPC
calls.
2006-09-07 10:18:52 +02:00
Robert Shearman 3535b70a0b rpcrt4: Remove some unused code. 2006-09-07 10:18:48 +02:00
Robert Shearman 5515633517 rpcrt4: Rename ndr_midl.c to ndr_clientserver.c to more accurately
idenitfy what the code contained does - it is a number of helpers for
generated client/server code.
2006-09-07 10:18:31 +02:00
Robert Shearman 583ae12233 rpcrt4: Move NdrStub* functions to cstub.c and move NdrProxy*
functions to cproxy.c since both sets of functions depend on the
implementations of the standard stubs and proxies.
2006-09-07 10:17:28 +02:00
Huw Davies d28698dd73 rpcrt4: Add a test for IRpcStubBuffer_Connect on a delegated stub.
This shows that we have a vtbl ptr at (void**)This-2 that is passed to
the base interface's IRpcStubBuffer_Connect.  This vtbl should
presumably forward calls to the real object's vtbl.  We can't simply
pass the real object to the base interface's stub, as the real
object's QI may not provide us with the base interface.
2006-08-29 12:26:31 +02:00
Huw Davies 161f60071e rpcrt4: Add a helper function to create a stub. 2006-08-29 12:26:22 +02:00
Alexandre Julliard 5cf75e615a makefiles: Only run test and documentation targets in directories that need them. 2006-08-28 13:37:44 +02:00
Huw Davies 487c691dc5 rpcrt4: Tests for CStdStubBuffer_Disconnect and a tidy up of the implementation. 2006-08-23 20:10:36 +02:00
Huw Davies f42f727f7c rpcrt4: Tests for CStdStubBuffer_Connect and fixes to make them pass. 2006-08-23 20:10:15 +02:00
Huw Davies cadc39842b rpcrt4: Add tests for CreateStub and fix up CStdStubBuffer_Construct to match. 2006-08-23 20:10:06 +02:00
Huw Davies 6a0fccd3a9 rpcrt4: Add tests for NdrStubForwardingFunction and write a commented out implementation.
This shows that the IRpcStubBuffer for a delegated stub's base
interface is stored at (void**)This-1.
2006-08-23 20:09:52 +02:00
Huw Davies a5dcb3e39d rpcrt4: Tests for NdrDllGetClassObject.
These show that delegated stubs need different Connect, Disconnect and
CountRefs methods than non-delegated stubs (ie they don't use all of
the CStdStubBuffer_* functions).
2006-08-23 20:09:04 +02:00
Stefan Huehner 998e256c82 Fix some -Wstrict-prototype warnings () -> (void). 2006-08-21 12:06:26 +02:00
Huw Davies 59be6e0600 rpcrt4: Remember to skip over the conformance description. 2006-08-18 11:34:26 +02:00
Huw Davies d9b6672530 rpcrt4: Add tests for NdrAllocate. 2006-08-17 11:19:17 +02:00
Robert Shearman 4bbc3ca8dc rpcrt4: Move processing of the arguments from NdrClientCall2 to two new functions. 2006-08-16 16:41:42 +02:00
Robert Shearman 68e867da81 rpcrt4: Forward NdrClientCall to NdrClientCall2.
NdrClientCall should be implemented as a separate function when 
NdrClientCall2 has been factorised enough.
2006-08-09 20:41:34 +02:00
Robert Shearman f953cc406a rpcrt4: Add some more traces and make the stack offsets easier to read in the stubless interpreter. 2006-08-09 20:41:21 +02:00
Robert Shearman 88bbbed176 rpcrt4: Change call_memory_sizer to preserve the buffer contents and
initialise the memory size field to zero before calling the memory
sizer function.
2006-08-09 20:41:13 +02:00
Robert Shearman d29108c396 rpcrt4: Set retval_ptr and allocate memory for out pointers for the old format stubless intepreter. 2006-08-09 20:41:01 +02:00
Robert Shearman 3db5f872a0 rpcrt4: Support fixed arrays in calc_arg_size. 2006-08-09 20:40:40 +02:00
Robert Shearman e26bcb7fb2 rpcrt4: Complex types should be dereferenced an extra time in the old format stubless code. 2006-08-09 20:40:30 +02:00
Robert Shearman 64828b7520 rpcrt4: Fix the stack offset for the old format stubless code when an object's method is being called. 2006-08-09 20:40:25 +02:00
Robert Shearman 488c0a0423 rpcrt4: Make the error output on a failed binding more informative
by dumping information about the interface it is trying to bind to.
2006-08-04 20:27:13 +02:00
Phil Lodwick dd000074fe rpcrt4: Support for SMVARRAY in EmbeddedComplexSize. 2006-07-25 11:31:59 +02:00
Robert Shearman 5700fe8a61 rpcrt4: Set BufferMark before calling EmbeddedPointerMarshall, EmbeddedPointerUnmarshall or EmbeddedPointerMemorySize. 2006-07-24 13:47:40 +02:00
Robert Shearman ba9158e2e1 rpcrt4: Improve the stubs for RpcImpersonateClient and RpcRevertToSelf. 2006-07-24 13:47:36 +02:00
Robert Shearman a8531067c4 rpcrt4: Support small fixed arrays in EmbeddedComplexSize. 2006-07-24 13:47:31 +02:00
Robert Shearman 4c4fc14fe9 rpcrt4: Allocate memory based on MaxCount, not ActualCount in NdrConformantStringUnmarshall. 2006-07-24 13:47:25 +02:00
Robert Shearman 98c26a81fe rpcrt4: Add support for marshaling the FC_HYPER base type in complex types.
Change the FIXME messages to print out unrecognised format characters in 
hex rather than decimal.
2006-07-24 13:47:13 +02:00
Robert Shearman d2cb9ec567 rpcrt4: Display a big message box if the user tries to use typelib
marshaling in native oleaut32 with builtin rpcrt4 to tell them what is
wrong.
2006-07-18 11:13:36 +02:00
Robert Shearman 9318cb0fbc rpcrt4: Handle more structure padding values. 2006-07-18 11:12:47 +02:00
Robert Shearman 2cb3b22c26 rpcrt4: Fix Variance Callback Functions.
A callback function for computing the variance puts the computed value 
into the same field as a conformance, so make sure to copy the value 
into pCount before returning from ComputeConformanceOrVariance.
2006-07-14 12:38:53 +02:00
Robert Shearman a02034a609 rpcrt4: Add the threading model and a description when registering a CLSID for the PSFactoryBuffer. 2006-07-14 12:38:48 +02:00
Robert Shearman 2538490d0b rpcrt4: Add a stub for I_RpcMapWin32Status. 2006-07-13 16:25:33 +02:00
Alexandre Julliard eb8a40c368 libs: Merged libwine_unicode into libwine.
Most dlls use libwine_unicode at this point, so there's nothing to
gain by having two separate libraries.
2006-07-11 19:33:22 +02:00
Alexandre Julliard 0fa8baafcb make_dlls: Recursively ignore .ok files in all tests directories. 2006-07-10 21:26:50 +02:00
Alexandre Julliard edd100b899 make_dlls: Recursively ignore testlist.c in all tests directories. 2006-07-10 21:19:42 +02:00
Alexandre Julliard 5258e061dc make_dlls: Ignore generated import libraries from the top-level .gitignore. 2006-07-10 20:55:58 +02:00
Alexandre Julliard cc2b3b48e6 Take advantage of the recursive nature of .gitignore for Makefile entries.
Prefix other entries with '/' to make them non-recursive.
2006-07-10 20:47:54 +02:00
Michael Stefaniuc 00e779370f janitorial: Put "inline static" at the beginning of a declaration. 2006-07-07 14:30:35 +02:00
Huw Davies 85ed9a5905 rpcrt4: Don't advance the buffer for FC_STRUCTPAD2. 2006-07-05 11:44:19 +02:00
Robert Shearman e7df38c27f rpcrt4: Add a stub for RpcMgmtSetServerStackSize. 2006-06-30 20:43:53 +02:00
Huw Davies 93fb9d10f5 rpcrt4: Calculate size of FC_STRUCT arguments correctly. 2006-06-26 12:36:10 +02:00
Robert Shearman 7d92b89abf rpcrt4: Stubs for RpcRevertToSelf and RpcMgmtSetComTimeout. 2006-06-21 13:39:52 +02:00
Robert Shearman 45d42528a0 rpcrt4: Add stub for RpcMgmtEnableIdleCleanup. 2006-06-21 13:39:38 +02:00
Huw Davies 3a56eca1c7 rpcrt4: Don't use a short to hold the packet length, since it can
result in premature termination of the send.
2006-06-20 20:35:38 +02:00
Robert Shearman 0da8836ff7 rpcrt4: Move the packet manipulation from the exception filter to the exception handler.
Remove the unused server_sem variable.
2006-06-19 23:04:19 +02:00
Robert Shearman 1437f8bd8c rpcrt4: Use the thread pool in the RPC server for processing packets. 2006-06-19 10:28:50 +02:00
Huw Davies 26c2953e58 rpcrt4: Fix the argument size of conformant arrays. 2006-06-16 14:42:36 +02:00
Robert Shearman b3c04e032d rpcrt4: getaddrinfo returns any non-zero value on failure, not just negative values. 2006-06-14 12:47:05 +02:00
Alexandre Julliard 2a91838f0c rpcrt4: Don't use sizeof in traces to avoid printf format warnings. 2006-06-13 14:11:28 +02:00
Alexandre Julliard d90f68166c rpcrt4/tests: Don't use sizeof in ok() to avoid printf format warnings. 2006-06-13 14:03:44 +02:00
Robert Shearman 1c04d9ab20 rpcrt4: Add an exception handler for CStdStubBuffer_Invoke.
This is needed because IRpcStubBuffer::Invoke should not allow RPC
exceptions to be passed to the caller.
2006-06-12 13:21:46 +02:00
Robert Shearman 35982d72f5 rpcrt4: Initialise pStubMsg->MemorySize to zero before calling
ComplexStructMemorySize from NdrComplexArrayUnmarshall.
2006-06-12 13:21:46 +02:00
Robert Shearman 539b48bff4 rpcrt4: Use safe_mutiply in conformant array functions. 2006-06-12 13:21:46 +02:00
Robert Shearman 8dea3c2aa8 rpcrt4: Pass in a maximum variance value to ReadVariance to allow us
to validate the conformance values being read from the wire.
2006-06-12 13:21:46 +02:00
Robert Shearman 613ee6d01c rpcrt4: Check that strings are null-terminated on unmarshaling of conformant-varying structs. 2006-06-12 13:21:46 +02:00
Robert Shearman a946eb420b rpcrt4: Use safe_multiply when multiplying anything by pStubMsg->ActualCount or pStubMsg->MaxCount. 2006-06-12 13:21:46 +02:00
Robert Shearman cec6092aa2 rpcrt4: Raise an exception during unmarshaling if a conformant string isn't null-terminated. 2006-06-12 13:21:46 +02:00
Robert Shearman 6e95bfe85a rpcrt4: Introduce a new function, safe_multiply, which will raise an
exception if a multiply overflows a 4-byte integer.

This will protect the unmarshaling code against attacks specifying a 
large variance.
Use this new function in the conformant string functions to harden them 
against attack.
2006-06-12 13:20:30 +02:00
Robert Shearman d98b73a17a rpcrt4: Clear an object pointer during unmarshaling, otherwise we
could end up using the previously allocated memory even if it isn't
the right size, causing heap corruption.
2006-06-09 21:07:57 +02:00
Robert Shearman 578df90d6d rpcrt4: Initialise pStubMsg->MemorySize to zero before calling ComplexStructMemorySize from NdrComplexArrayUnmarshall. 2006-06-09 21:07:44 +02:00
Robert Shearman e3df112a39 rpcrt4: Don't raise an exception if there is no freer function - not all types have a freer. 2006-06-09 21:07:37 +02:00
Robert Shearman 21673d03f9 rpcrt4: Implement more base types for complex types. 2006-06-09 21:07:22 +02:00
Robert Shearman 0b1e51ca25 rpcrt4: Now that there's a process-wide pool of connections we don't
need to copy the FromConn field when copying bindings.
2006-06-09 21:07:11 +02:00
Robert Shearman 56386bd88c rpcrt4: Return the status received from RPCRT4_Send in I_RpcSend instead of always returning RPC_S_OK. 2006-06-09 21:07:02 +02:00
Alexandre Julliard c32dc6744c rpcrt4: Make the protseq_ops structure constant. 2006-06-09 13:12:58 +02:00
Alexandre Julliard c0fcba798b rpcrt4: Avoid potential redefinition of uuid_t. 2006-06-08 11:29:26 +02:00
Robert Shearman 58ec282bfb rpcrt4: Implement a process-wide connection pool for client connections,
rather than relying on the restriction of one connection per
binding. This also avoids the problem of two threads using the same
connection at the same time.
2006-06-08 10:16:00 +02:00
Robert Shearman 1412c47a50 rpcrt4: Fix the retrieval of This for interpreted proxies. 2006-06-08 10:15:36 +02:00
Robert Shearman 7ef5c3c772 rpcrt4: Implement full-pointer support for interpreted stubs.
Move the calls to the full pointer init functions before
NdrClient/ServerInitializeNew, like in MIDL-generated code.
2006-06-08 10:15:22 +02:00
Robert Shearman c9779ca16b rpcrt4: Implement varying array NDR functions. 2006-06-05 13:25:09 +02:00
Robert Shearman cd19c99284 rpcrt4: Don't call NdrBaseTypeMemorySize from within NdrBaseTypeUnmarshall. 2006-06-05 13:24:54 +02:00
Robert Shearman 0fad0895d7 rpcrt4: Don't try to resolve the name when constructing a protocol tower.
Instead just fill it in with all zeros.
2006-06-03 11:42:54 +02:00