Commit Graph

333 Commits

Author SHA1 Message Date
Mike McCormack e7e209da64 rpcrt4: Move the connected check inside the named pipe code. 2006-04-21 11:32:07 +02:00
Mike McCormack 5c6f72873a rpcrt4: Split the transport layer into a different file. 2006-04-21 11:31:51 +02:00
Mike McCormack 9b791e0983 rpcrt4: Allocate RpcServerProtseq in a single place. 2006-04-21 11:28:39 +02:00
Mike McCormack fe99f330ab rpcrt4: Abstract the transport layer functionality. 2006-04-20 19:48:15 +02:00
Mike McCormack 0ee6f59cc0 rpcrt4: Use a separate function to open each protseq. 2006-04-20 15:30:23 +02:00
Mike McCormack 3a4a76be2f rpcrt4: Abstract access to the connection's waitable object. 2006-04-20 15:17:06 +02:00
Robert Shearman 0ced865aa1 rpcrt4: Don't apply the offset to the pointer passed to callback conformance functions. 2006-04-20 15:12:20 +02:00
Robert Shearman 8d36337644 rpcrt4: Free all pointers by default, except for conformant strings.
Free all pointers by default, except for conformant strings.
Conformant arrays should always be freed.
Add FC_CVARRAY to list of known types to avoid a FIXME.
2006-04-20 15:12:07 +02:00
Robert Shearman b36d5fa11f rpcrt4: Fix some memory leaks. 2006-04-20 15:11:51 +02:00
Robert Shearman 98facf4d0f rpcrt4: Use the documented NDR_PROC_HEADER_EXTS structure.
Use the documented NDR_PROC_HEADER_EXTS structure instead of the
current NDR_PROC_EXTENSIONS structure currently in ndr_stubless.c.
2006-04-20 15:11:34 +02:00
Robert Shearman 28f494e31a rpcrt4: Use INTERPRETER_OPT_FLAGS in ndrtypes.h instead of flags on an unsigned char. 2006-04-20 15:11:24 +02:00
Robert Shearman 312df9bf7f rpcrt4: Store the return value on the stack for interpreted stubs.
Store the return value on the stack for stubs, as MIDL reserves space
for it and gives us a stack offset. This fixes calling methods with
thunks that assume that the return value will be stored on the stack.
2006-04-20 15:10:25 +02:00
Robert Shearman f4de78babe rpcrt4: Correctly fill in StackTop for stubless clients/servers.
Correctly fill in StackTop for stubless clients/servers so that
conformance for top-level parameters works.
2006-04-20 15:10:09 +02:00
Robert Shearman 727e25d673 rpcrt4: There's no need to set stubMsg.StackTop twice. 2006-04-20 15:09:49 +02:00
Robert Shearman a674ec0fda rpcrt4: Fix the MSVC version of call_server_func.
Fix the MSVC version of call_server_func to pop the registers in the
same order they were pushed.
2006-04-20 15:09:39 +02:00
Mike McCormack 5f6ac9c484 rpcrt4: Use rpcrt4_conn_read in RPCRT4_OpenBinding. 2006-04-19 19:17:42 +02:00
Mike McCormack 71fc596a05 rpcrt4: Make RPCRT4_Send more compatible with write(2). 2006-04-19 19:15:53 +02:00
Mike McCormack 9a4abffa18 rpcrt4: Make RPCRT4_Receive more compatible with read(2). 2006-04-19 15:23:37 +02:00
Mike McCormack d571441562 rpcrt4: Simplify RPCRT4_OpenConnection() a little. 2006-04-19 14:48:02 +02:00
Mike McCormack ae8197ef37 rpcrt4: Split code to open a pipe from RPCRT4_OpenConnection. 2006-04-19 14:31:01 +02:00
Mike McCormack 7e709cf258 rpcrt4: Isolate code to open named pipes out of RPCRT4_OpenConnection. 2006-04-19 14:30:15 +02:00
Mike McCormack a0f8623e2e rpcrt4: Stub implementation for rpcrt4.RpcMgmtEpEltInqBegin(). 2006-04-19 12:00:26 +02:00
Mike McCormack f0c49daedf rpcrt4: Add a stub implementation for rpcrt4.RpcMgmtInqIfIds(). 2006-04-19 12:00:09 +02:00
Dmitry Timoshkov 590f6faee1 rpcrt4: Constify NDR function tables. 2006-04-14 19:36:09 +02:00
Robert Shearman 4253b01239 rpcrt4: Change the stubless parameter attributes to using a bitfield
(as defined by the PSDK) so the ServerAllocSize part is easier to
calculate.
2006-03-01 19:54:00 +01:00
Robert Shearman e8877ede80 rpcrt4: Implement marshaling and unmarshaling for enum types. 2006-03-01 19:53:35 +01:00
Robert Shearman b7bf68f4d0 rpcrt4: Don't call IUnknown_AddRef if there is no outer unknown in
StdProxy_Construct as it will just crash anyway.
2006-02-07 16:24:33 +01:00
Robert Shearman 4d25edc298 rpcrt4: Restrict stubless FC types to the range of the type function table. 2006-02-03 18:46:40 +01:00
Robert Shearman 666baea161 rpcrt4: Raise exceptions in NdrSendReceive if I_RpcSendReceive failed. 2006-02-03 18:46:32 +01:00
Robert Shearman 7f15d9bc4f rpcrt4: Handle the RPC_FC_PROC_BYVAL flag correctly in stubless
proxies and stubs.
2006-01-31 12:21:20 +01:00
Robert Shearman 4197140738 rpcrt4: Only attempt to marshal an object if it is non-NULL. 2006-01-31 12:21:13 +01:00
Robert Shearman b670ec83fd rpcrt4: Fill in the IRpcStubBuffer vtables for interfaces that don't
already have them filled in.
2006-01-30 14:56:07 +01:00
Robert Shearman 8c55c6f053 rpc: Replace the hack that detected stubless proxies with the correct check.
Pass in the ProxyInfo and Index to StdProxy_Construct instead of just
the three members of the structure that were previously needed.
Fix the detection of stubless proxies.
2006-01-20 16:15:25 +01:00
Robert Shearman 5b629e9509 rpc: Skip over the right number of bytes in new correlation descriptors.
Skip over 6 bytes of the format descriptor if new correlation
descriptors are being used, instead of 4.
2006-01-20 16:15:11 +01:00
Robert Shearman 68b9225022 rpcrt4: Clear the newly allocated memory used for complex arrays and structs. 2006-01-18 11:29:50 +01:00
Robert Shearman a4000349f8 rpcrt4: Fix the sending of >5800 byte messages by only adding offset
to the buffer after the first batch of data has been written to the
pipe.
2006-01-18 11:29:38 +01:00
Alexandre Julliard 49c7bbe0de rpcrt4: Fixed asm syntax for rep; movsl. 2006-01-14 17:07:28 +01:00
Robert Shearman b330bd7ae9 rpcrt4: Remove the unused RPCRT4_GetPSFactory function. 2006-01-10 19:59:48 +01:00
Robert Shearman e298538459 rpcrt4: Don't release the interface pointer on failure.
Don't release the interface pointer on failure since we are not the
ones that allocated it. It is the caller's responsability to call
NdrInterfacePointerFree, where the freeing is supposed to happen.
2006-01-10 19:59:26 +01:00
Robert Shearman 1926b6da63 rpcrt4: Improve ReadVariance.
Extend ReadVariance to read the offset as well as the actual count,
since these always come in pairs.
Handle the variance not being present in ReadVariance and always call
it from the unmarshalling functions to simplify the code there and
also to fix a bug where the format pointer wasn't advanced properly
for complex arrays (introduced in the previous patch when implementing
variance).
2006-01-09 17:21:01 +01:00
Robert Shearman 2e875d5d35 rpcrt4: Validate complex array format string.
Verify that the format string being passed into the complex array
functions is a complex array one.
2006-01-09 17:20:19 +01:00
Robert Shearman c96e102fff rpcrt4: Compute variance for complex arrays 2006-01-06 21:07:27 +01:00
Robert Shearman 3180de6a98 rpcrt4: Call NdrStubCall2 when dealing with a pure interpreted stub
that has no dispatch table.
2006-01-06 21:07:20 +01:00
Robert Shearman be77b87600 rpcrt4: Implement NdrClientCall2 and NdrServerCall2. 2006-01-05 12:19:05 +01:00
Robert Shearman 03060551d6 rpcrt4: Implement callback conformance. 2006-01-03 12:07:17 +01:00
Robert Shearman 196829663a rpcrt4: Fix race condition in RpcServerListen.
The DontWait parameter is used for forcing the function not to wait
for the server to finish.
2006-01-03 12:07:04 +01:00
Robert Shearman 68fcd5d8f7 Add a function to retrieve the MIDL_SERVER_INFO struct from an object. 2005-11-29 10:42:04 +01:00
Robert Shearman 4a76473965 The CLSID can be substituted by an IID present in one of the proxy
file infos in NdrDllGetClassObject.
2005-11-29 10:41:55 +01:00
Robert Shearman 96a8f8edda Return the correct error code from NdrProxyErrorHandler. 2005-11-29 10:41:45 +01:00
Robert Shearman bb90b3e3cc Raise exceptions on failures.
Replace references of pStubMsg->BufferEnd with RpcMsg->Buffer +
pStubMsg->BufferLength.
Fix buffer calculation when no interface data is marshaled to the
stream.
2005-11-29 10:41:34 +01:00
Robert Shearman 552f18211d Fix the overflow check to not depend on pStubMsg->BufferStart and
pStubMsg->BufferEnd being valid, because they aren't filled in when
using MIDL-generated server stubs.
Don't set the pointer to NULL on unmarshaling because we may want to
unmarshal the value to an existing pointer instead of allocating a new
one.
2005-11-29 10:41:17 +01:00
Ge van Geldorp 1a1583a364 Match PSDK STATUS_* definitions. 2005-11-28 17:32:54 +01:00
Robert Shearman 386c3a5819 Make sure to fill out the MIDL_STUB_MESSAGE structure in
NdrSendReceive like we do in NdrProxySendReceive.
2005-11-28 11:31:04 +01:00
Robert Shearman d9896dec47 Implement conformant varying array functions. 2005-11-28 11:30:32 +01:00
Robert Shearman bc16c66736 Implement conformant struct functions. 2005-11-28 11:30:12 +01:00
Robert Shearman d42ff35087 Implement FC_STRUCTPAD2 for complex types. 2005-11-28 11:28:45 +01:00
Robert Shearman 5ed6dc2c1b Add functions for marshaling base types (ints, floats, etc.). 2005-11-28 11:24:21 +01:00
Robert Shearman fc17683f7d Extend conformance computation function to also compute variances.
MSDN suggests that conformance and variance are pretty much the same,
but there may be some subtleties to it.
2005-11-28 11:16:44 +01:00
Robert Shearman b73a4a9528 Fix NdrConformantArrayBufferSize to include the size of the
conformance value.
Make NdrConformantArrayMemorySize do something more useful, like
actually return the required memory.
Conformance offset can be negative and should only be two bytes.
2005-11-28 10:58:40 +01:00
Robert Shearman a1758ed6e0 We should always allocate in NdrConformantStringUnmarshal if the
memory pointer is NULL.
2005-11-28 10:39:10 +01:00
Alexandre Julliard 0ec7e1a591 Renamed all .cvsignore files to .gitignore. 2005-11-26 13:10:33 +01:00
Vincent Béron f9a27638f5 Mark some functions as implemented in the spec files. 2005-11-21 11:58:49 +00:00
Huw Davies c7462e431f Marshal enums. 2005-10-31 21:05:00 +00:00
Huw Davies c4e8f06375 Stubs for NdrStubForwardingFunction and NdrCStdStubBuffer2_Release
along with a few related defines.
2005-10-26 13:56:00 +00:00
Alexandre Julliard 7e22be4d84 We are no longer generating .dbg.c files. 2005-09-29 10:35:58 +00:00
Robert Shearman b3a4b59668 Fix ref-counting rules to match native DCOM Dlls. 2005-09-18 11:10:37 +00:00
Alexandre Julliard 20a1a203c6 Use a more portable scheme for storing the name of a critical
section.
2005-09-09 10:19:44 +00:00
Ge van Geldorp 94dc00c558 Fix NdrServerContextMarshall prototype. 2005-09-08 11:02:38 +00:00
Mike McCormack d168219849 Fix gcc 4.0 warnings. 2005-09-06 10:26:13 +00:00
Robert Shearman 0aef679535 - Implement most of the details around unmarshalling of an object
pointer.
- Fix allocation scheme in NdrConformantArrayUnmarshal to allocate if
  *ppMemory is NULL, like complex struct and user type unmarshalling.
2005-09-02 11:19:26 +00:00
Mike McCormack 4a5378efcd Fix some gcc 4.0 warnings. 2005-08-30 08:56:35 +00:00
Alexandre Julliard cc4da88563 Explicitly import kernel32 in tests that use it. 2005-08-27 09:27:09 +00:00
Alexandre Julliard d37f0abf07 Don't prefix the functions DllCanUnloadNow, DllGetClassObject and
Dll(Un)RegisterServer with the dll name so that the compiler can check
the prototypes.
2005-08-08 17:35:28 +00:00
Robert Shearman 037bbdaf24 Add stubs for NdrMapCommAndFaultStatus, conformant string marshaling
and context handle functions.
2005-08-03 14:55:57 +00:00
Robert Shearman c9e4ef73d2 Don't free previous buffer in NdrGetBuffer. 2005-08-03 14:55:05 +00:00
Stefan Huehner 4f82e547d7 Fix some missing-declarations warnings. 2005-07-24 17:11:59 +00:00
Francois Gouget c995331d27 Fix the NdrVaryingArrayUnmarshall prototype (reported by
winapi_check).
2005-07-22 09:03:42 +00:00
Robert Shearman b0b3080b2d IRpcStubBuffer_Disconnect can be called more than once. 2005-07-19 19:12:54 +00:00
Robert Shearman 8c02f6367e Add stubs for most of the NDR marshaling functions. 2005-07-18 13:14:05 +00:00
Mike McCormack bda7ace2e9 Interlocked LONG* gcc warning fixes. 2005-07-13 11:59:15 +00:00
Stefan Huehner 2440dcfe88 Fix -Wmissing-declarations warnings. 2005-07-05 12:49:14 +00:00
Mike McCormack b8fc783be2 Avoid warnings in generated tests by casting sizeof(x) to an int. 2005-07-03 11:23:30 +00:00
Francois Gouget 02c25a8981 Assorted spelling fixes. 2005-06-30 18:19:33 +00:00
Alexandre Julliard f84401aa17 Sort entry points in the same order as Windows. 2005-06-23 09:57:11 +00:00
Stefan Huehner 9213d56ae0 Make some function static. 2005-06-20 15:35:54 +00:00
Robert Shearman ff4ba9573c Fix an RPC server startup race introduced by me. 2005-06-08 18:32:30 +00:00
Robert Shearman cdb3cdf3cf - Don't pass the PROFILE_SERVER flag in to CreateNamedPipe as it is
bogus.
- Call FlushFileBuffers to make sure the other end of the pipe doesn't
  get cut off prematurely.
- Don't call CancelIo as we should never have async I/O pending.
2005-06-08 18:31:38 +00:00
Robert Shearman 8aecfff867 Make NdrInterfacePointer* more reliable. 2005-06-07 20:07:06 +00:00
Dmitry Timoshkov eba47f1dfe Make remaining OLE interface vtables const. 2005-06-06 19:50:35 +00:00
Mike Hearn f45cb12553 Initialize DataRepresentation in NdrClientInitializeNew, not
NdrSendReceive.
2005-06-05 19:19:50 +00:00
Robert Shearman acbb3f2f8d - Improve tracing.
- Implement FC_UP and partially FC_OP.
- Don't needlessly marshal 4 bytes in NdrPointer*.
2005-06-01 11:04:03 +00:00
Vincent Béron 4440a7278f Provide minimal API documentation in advapi/eventlog.c to silence some
winapi_check output.
Move around functions in riched20, richedit and rpcrt4 to achieve the
same goal.
2005-05-16 08:51:19 +00:00
Robert Shearman b5eacf9a8d - Fix RpcServerListen so that it doesn't return
RPC_S_ALREADY_LISTENING when the only interfaces it is listening on
  are auto listens.
- Only synchronize with server thread when necessary and move this
  into RpcMgmtWaitServerListen.
2005-05-13 13:55:24 +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
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
Hartmut Birr af384ad7a8 Clean up if named pipe is not available. 2005-05-06 14:33:11 +00:00
Francois Gouget 3ef8c51c8a Tweak the API documentation to silence winapi_check warnings. 2005-04-20 15:18:42 +00:00
Francois Gouget 6b10c324c5 Assorted spelling fixes. 2005-03-30 17:08:31 +00:00
Jakob Eriksson 9ed61de9a2 Get rid of HeapAlloc casts. 2005-03-24 21:01:35 +00:00
Robert Shearman 16779f1e5e Fix deadlock caused by not leaving the critical section on all code
paths.
2005-03-19 17:05:41 +00:00