Robert Shearman
4c0b0e0069
rpcrt4: Implement computing of conformance from a correlation descriptor for conformant strings.
2006-05-16 12:51:09 +02:00
Robert Shearman
124acc9b67
rpcrt4: Fix conformant varying structs to comply to the DCE/RPC spec.
2006-05-16 12:50:54 +02:00
Robert Shearman
e6120f2029
rpcrt4: Don't duplicate the conformance calculating code, just use the
...
common ComputeConformance function to store the result in
pStubMsg->MaxCount (as this is what callback function store the
conformance value into anyway).
2006-05-16 12:50:42 +02:00
Robert Shearman
ecdd09b1b2
rpcrt4: Implement conformant varying struct functions.
2006-05-16 12:50:27 +02:00
Robert Shearman
63aaf8dbd7
rpcrt4: Implement more conformance operations and more types.
2006-05-16 12:50:19 +02:00
Mike McCormack
336e67e2d1
rpcrt4: Implemented NTLM authentication for rpcrt4 connections.
2006-05-16 12:40:13 +02:00
Mike McCormack
f20cfdfa84
rpcrt4: Use RPCRT4_Receive rather than accessing the transport directly.
2006-05-16 12:36:37 +02:00
Robert Shearman
b96d630022
rpcrt4: Implement NdrSimpleStructMemorySize.
2006-05-15 16:08:45 +02:00
Robert Shearman
2aff761dfd
rpcrt4: Fix the conformant struct functions to not call conformant array functions.
...
The conformance has to be the first thing in the buffer, in accordance
with the DCE/RPC spec and to be compatible with the pointer layout
format strings that MIDL generates.
2006-05-15 16:08:36 +02:00
Robert Shearman
4af0a6b805
rpcrt4: In NdrConformantBufferSize, SizeConformance should be called, not SizeVariance.
2006-05-15 16:08:28 +02:00
Robert Shearman
2479aec4af
rpcrt4: Save pStubMsg->ActualCount in a local variable in the complex
...
array functions, before calling a function that could change it and
cause the wrong number of loop iterations.
2006-05-15 16:08:19 +02:00
Robert Shearman
345c92643e
rpcrt4: Dereference the memory for pointers in NdrNonEncapsulatedUnionUnmarshall.
...
Pointers in a non-encapsulated union behave like embedded pointers, so
don't rely on the NdrPointer* functions doing the right thing in this
case and call the Pointer* functions directly.
2006-05-15 16:08:04 +02:00
Robert Shearman
f0aea2d5ee
rpcrt4: Rename ComplexStructSize to ComplexStructMemorySize to reflect the fact that it increments the buffer.
...
Replace the code in EmbeddedComplexSize that sizes non-encapsulated
unions without using a memory sizer routine, since this function
shouldn't touch the buffer.
Add a new function EmbeddedComplexMemorySize and use it in some memory
sizer routines where EmbeddedComplexSize was previously used.
2006-05-15 16:07:54 +02:00
Robert Shearman
788ce20dea
rpcrt4: Fix embedded pointers in arrays by taking into account the iteration when calculating the appropriate memory and buffer pointers.
2006-05-15 16:07:42 +02:00
Robert Shearman
07d032b24b
rpcrt4: The arm type mask should be comparing the highest byte against 0x80, as documented on MSDN.
...
Fix base type arm handling on little-endian machines, as the current
code would always pass in the address to the format char of 0x80
instead of the base type format char.
2006-05-15 14:07:59 +02:00
Robert Shearman
5cdfeeeed3
rpcrt4: Make ComplexStructSize increment the buffer.
2006-05-15 14:07:36 +02:00
Robert Shearman
3e988bfc4f
rpcrt4: Pass in the buffer value before incrementing to PointerMarshall in NdrPointerMarshall.
2006-05-15 14:07:25 +02:00
Robert Shearman
22bf15049c
rpcrt4: Implement NdrComplexStructMemorySize.
2006-05-15 14:07:13 +02:00
Robert Shearman
cedbddbfde
rpcrt4: Implement NdrComplexArrayMemorySize.
2006-05-15 14:06:55 +02:00
Robert Shearman
7ea0b860c5
rpcrt4: Fix the fault packet structure to comply with the DCE/RPC specification.
2006-05-15 14:06:52 +02:00
Robert Shearman
628c5e9baf
rpcrt4: The NDR memory sizing functions should increment the buffer pointer, so make sure to save it before calling one of these and restore it afterwards.
2006-05-15 14:06:41 +02:00
Robert Shearman
dcd0a39d4c
rpcrt4: Make NdrBaseTypeMemorySize increment the buffer and memory size fields of MIDL_STUB_MESSAGE.
2006-05-15 14:06:31 +02:00
Robert Shearman
4d65110b90
rpcrt4: Make NdrConformantStringUnmarshall use the new Read{Variance,Conformance}
...
functions and adapt them to be callable without having a correlation
descriptor.
2006-05-15 14:06:05 +02:00
Mike McCormack
a9886585de
rpcrt4: Add missing PKT_AUTH3 packet type.
2006-05-15 13:56:58 +02:00
Mike McCormack
7b5e5b65b0
rpcrt4: Add infrastructure for send authentication data.
2006-05-15 13:56:54 +02:00
Mike McCormack
1912fceab6
rpcrt4: Forward RpcBindingSetAuthInfo to RpcBindingSetAuthInfoEx.
2006-05-15 13:56:50 +02:00
Francois Gouget
325912de98
rpcrt4: Fix some conditional includes.
...
Check for HAVE_UNISTD_H before including unistd.h.
There is no HAVE_SYS_TYPES to check.
Tweak the indentation of a few #include directives.
2006-05-15 11:09:41 +02:00
Mike McCormack
9088debbfb
rpcrt4: Cache the connection so we don't rebind on every call.
2006-05-10 19:26:29 +02:00
Robert Shearman
ababfdef82
rpcrt4: Use the buffer passed in as an argument and don't increment
...
the buffer in the MIDL_STUB_MESSAGE in the inner pointer
marshalling/unmarshalling routines as these can be used for embedded
pointers, which handle the allocating or finding of the buffer
themselves. Do the incrementing in the outer
NdrPointerMarshall/Unmarshall/BufferSize routines instead.
2006-05-10 19:26:10 +02:00
Robert Shearman
c3a087eb45
rpcrt4: Align conformances and variances correctly, according the the DCE/RPC spec.
2006-05-10 19:25:45 +02:00
Robert Shearman
265045d251
rpcrt4: Move the writing and sizing of variances and conformances to common functions.
2006-05-10 19:25:37 +02:00
Robert Shearman
4b4192f3a5
rpcrt4: Correctly align the buffer to read/write array data to.
2006-05-10 19:25:26 +02:00
Robert Shearman
95d79e2c58
rpcrt4: Correctly align the buffer before reading/writing structure data.
2006-05-10 19:25:16 +02:00
Robert Shearman
5616c4150c
rpcrt4: Rename NonEncapsulatedUnionSize to NdrNonEncapsulatedUnionMemorySize.
2006-05-10 19:25:06 +02:00
Robert Shearman
75fe824e89
rpcrt4: Remove unintuitive requirement to pass the required alignment boundary minus one into the alignment macros.
2006-05-10 19:24:50 +02:00
Robert Shearman
f7fa650d1b
rpcrt4: Automatically resolve the endpoint.
2006-05-08 15:36:29 +02:00
Robert Shearman
cce073a777
rpcrt4: Use getaddrinfo to get the sockaddr.
...
Use getaddrinfo to get the sockaddr to use for connecting to a remote
server as Connection->NetworkAddr may be a hostname as well. Use a
loop to support both IP and IPv6.
2006-05-07 10:04:40 +02:00
Robert Shearman
772eb9bdf9
rpcrt4: Implement NdrConformantVaryingArrayFree.
2006-05-07 10:03:01 +02:00
Robert Shearman
b43e799486
rpcrt4: Dereference the pointer if necessary only after doing the
...
pointer checks and writing the pointer ID to the wire.
2006-05-07 10:02:05 +02:00
Robert Shearman
a4f5296ec6
rpcrt4: Add a stub for RpcBindingSetOption.
2006-05-07 10:01:44 +02:00
Robert Shearman
9519004b1a
rpcrt4: Improve the traces in the pointer functions.
2006-05-07 10:01:37 +02:00
Huw Davies
b1d5158980
rpcrt4: Support for non-encapsulated unions.
2006-05-05 16:55:49 +02:00
Mike McCormack
4e49c380c4
rpcrt4: Add stub implementations for RPC authentication functions.
2006-05-05 16:33:54 +02:00
Mike McCormack
481cec4006
rpcrt4: Invalid sockets should have a value of -1.
2006-04-21 12:44:45 +02:00
Mike McCormack
3d5e517e5b
rpcrt4: Add support for the ncacn_ip_tcp transport layer.
2006-04-21 11:34:08 +02:00
Mike McCormack
5bfb579f9a
rpcrt4: Add a stub transport layer for ncacn_ip_tcp.
2006-04-21 11:32:57 +02:00
Mike McCormack
87ddd7b53a
rpcrt4: Hide the details of the rpc transport mechanism.
2006-04-21 11:32:44 +02:00
Mike McCormack
83109e4937
rpcrt4: Abstract RPCRT4_SpawnConnection.
2006-04-21 11:32:29 +02:00
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