Commit Graph

284 Commits

Author SHA1 Message Date
Alexandre Julliard
ee5cada235 rpcrt4: Don't align the buffer after reading the conformance, we need to read the variance first. 2010-07-21 20:31:53 +02:00
Gerald Pfeifer
3b3085fba1 rpcrt4: Remove variable size which is not really used from NdrComplexArrayUnmarshall. 2010-04-26 07:01:03 -05:00
Alexandre Julliard
a758a38fae rpcrt4: Add support for marshalling int3264 types. 2010-04-07 13:09:30 +02:00
Alexandre Julliard
cf50aa91f6 rpcrt4: Clean up handling of enum16 types. 2010-04-07 13:09:17 +02:00
Alexandre Julliard
fe2f875aaf rpcrt4: Add support for complex arrays in the generic array unmarshalling functions. 2010-04-05 22:02:20 +02:00
Alexandre Julliard
3243ee7e0b rpcrt4: Add support for complex arrays in the generic array marshalling functions. 2010-04-05 22:01:46 +02:00
Alexandre Julliard
c1a9dc8ad2 rpcrt4: Always skip the conformance format, even if conformance is not present in the buffer.
Add an identical SkipVariance function to make the code clearer.
2010-04-05 21:59:30 +02:00
Alexandre Julliard
5728d6b402 rpcrt4: Fix tracing of non-conformant strings. 2010-04-05 21:58:06 +02:00
Alexandre Julliard
b91e5302a5 rpcrt4: Replace the alignment macros by inline functions. 2010-04-02 21:54:55 +02:00
Alexandre Julliard
afa56b29ce rpcrt4: Fix the pointer alignment macros for 64-bit. 2010-04-02 21:38:32 +02:00
Mikhail Maroukhine
9b933a3594 rpcrt4: Fix compiler warnings with flag -Wcast-qual. 2010-04-01 18:12:41 +02:00
Rob Shearman
088c0857c9 rpcrt4: Add support for marshalling/unmarshalling complex arrays of pointers. 2010-03-16 11:42:09 +01:00
Huw Davies
87b712be8b rpcrt4: Add support for FC_FLOAT and FC_DOUBLE in complex structures. 2010-02-22 13:18:50 +01:00
Marcus Meissner
122ca034db rpcrt4: Exit on unknown confirmance type (Coverity). 2009-12-15 16:09:11 +01:00
Rob Shearman
b24aa1c153 rpcrt4: Add support for context handles in stubless servers. 2009-12-14 12:04:05 +01:00
Marcus Meissner
4c36f79964 rpcrt4: Fixed array_compute_and_size_conformance on strings (Coverity). 2009-12-07 14:18:28 +01:00
Rob Shearman
37793cd550 rpcrt4: Fix the pointer saved during full pointer unmarshalling.
The pointer address may set by the type unmarshalling function and
therefore will not be base_ptr_val. This value is the value at
*pPointer and is what needs to be retrieved during subsequent
unmarshalling of the same function.
2009-11-18 15:14:10 +01:00
Francois Gouget
891d3ef525 rpcrt4: Fix compilation on systems that don't support nameless unions. 2009-08-31 12:41:37 +02:00
Huw Davies
70804336aa rpcrt4: Add support for FC_ALIGNM2. 2009-08-17 16:47:24 +02:00
Alexandre Julliard
b579c48133 rpcrt4: Fix memory sizes of marshalled pointers on 64-bit. 2009-06-19 12:49:35 +02:00
Alexandre Julliard
aded9e4091 rpcrt4: Fix compiler warnings on 64-bit. 2009-05-28 11:56:30 +02:00
Alexandre Julliard
feeaf97c81 rpcrt4: Implement NdrPointerMemorySize and enable the corresponding tests. 2009-05-28 11:52:36 +02:00
Michael Stefaniuc
3b803f5390 rpcrt4: Replace some usage of the long type. 2009-04-21 13:16:31 +02:00
Rob Shearman
ae5770d366 rpcrt4: Fix a memory leak in union unmarshall functions by never passing fMustAlloc=TRUE into union_arm_unmarshall. 2009-03-23 14:54:29 +01:00
Rob Shearman
1c8c45d0f6 rpcrt4: Implement NdrRangeUnmarshall for enum types. 2009-03-23 14:54:15 +01:00
Alexandre Julliard
85f8f30a65 rpcrt4: Use RpcMsg->Buffer instead of BufferStart since the latter isn't always set. 2009-03-12 13:09:54 +01:00
Rob Shearman
689a49b52a rpcrt4: Add a check for a NULL ref pointer to NdrPointerUnmarshall. 2009-03-11 10:29:26 +01:00
Michael Stefaniuc
e3bb1c8243 rpcrt4: Remove superfluous pointer casts. 2009-02-16 16:01:37 +01:00
Rob Shearman
78ac42bb1c rpcrt4: Implement NdrGetUserMarshalInfo. 2009-01-28 14:16:13 +01:00
Alexandre Julliard
9876c5433f rpcrt4: Don't align the buffer pointer in ComplexStructMemorySize for alignment formats. 2009-01-26 15:12:07 +01:00
Rob Shearman
05063ece28 rpcrt4: Don't declare functions that aren't exported by rpcrt4.dll in include/rpcndr.h.
NdrRangeMarshall, NdrRangeBufferSize, NdrRangeFree and
NdrByteCountPointerMemorySize should be declared static in
ndr_marshall.c instead.
2009-01-23 16:13:53 +01:00
Hans Leidekker
7df0a4ecb2 rpcrt4: Move NdrGetUserMarshalInfo stub near user marshal functions. Add documentation header. 2009-01-23 13:40:36 +01:00
Rob Shearman
59158fb25c rpcrt4: Unmarshalling functions should always set fMustAlloc when allocating memory.
The memory is uninitialised and so further unmarshalling shouldn't try
to reuse any memory. fMustAlloc is always set to TRUE when allocating
memory so that it is clear that the unmarshalling is safe and to avoid
future problems with change or the code being copied.
2009-01-12 13:07:31 +01:00
Alexandre Julliard
9d09985ad1 rpcrt4: Fix an unused value warning on non-i386. 2009-01-08 17:30:09 +01:00
Francois Gouget
bbc4413548 rpcrt4: Remove WINAPI on static functions where not needed. 2008-11-26 12:10:54 +01:00
Huw Davies
c74de4a1ce rpcrt4: Actually set an unmarshalled object ptr to NULL when a NULL pointer id is received. 2008-10-02 10:28:19 -05:00
Rob Shearman
a8f7c716ef rpcrt4: Change type of len parameter of NdrAllocate from size_t to SIZE_T.
Use SIZE_T as it matches the size that Windows programs expect whereas
size_t is platform-dependent.
2008-09-08 12:51:37 +02:00
Rob Shearman
27ae234b04 rpcrt4: Remove unreachable code in EmbeddedComplexSize.
RPC_FC_ERROR_STATUS_T has a value of 0x10 and therefore isn't a
possible value of "flags_type & 0xf" in the switch statement.
2008-08-18 17:34:13 +02:00
Rob Shearman
2652ddfeba rpcrt4: Re-implement part of the conformant varying structure processing routines using array_* functions. 2008-08-18 14:34:41 +02:00
Rob Shearman
b2305adc3c rpcrt4: Factorise conformant string functions into array_* functions.
This allows conformant string array types to be
marshalled/unmarshalled when embedded in a complex type.
2008-08-18 14:34:40 +02:00
Rob Shearman
9e3260847a rpcrt4: Factorise conformant varying array functions into array_* functions.
This allows conformant varying array types to be
marshalled/unmarshalled when embedded in a complex type.
2008-08-18 14:34:40 +02:00
Rob Shearman
9116d73c63 rpcrt4: Factorise conformant array NDR functions and use them to fix the wire-representation of complex structures with conformant arrays.
Factorise each conformant array function into the part that deals with
reading, writing or sizing the conformance and another part that deals
with reading, writing or sizing the variance and the element data.

This allows complex structures to use the right wire format where the
conformance appears before the structure data starts.
2008-08-18 14:34:40 +02:00
Rob Shearman
8af1dba5a9 rpcrt4: Fix the memory pointer passed into the conformant array marshaller in NdrComplexStructMarshall.
It needs to be the end of the memory used by the constant part of the
structure, which is returned by CompkexStructMarshall.
2008-07-16 17:54:48 +02:00
Rob Shearman
b75828fc90 rpcrt4: Clear the memory of embedded complex types in ComplexUnmarshall when fMustAlloc is TRUE to avoid passing uninitialised memory to the unmarshaller.
Found by Valgrind.
2008-07-07 12:11:24 +02:00
Rob Shearman
620d783680 rpcrt4: Don't reserve space in the buffer for reference pointers embedded in complex types.
Ref pointers don't need a pointer ID and reserving space would render
the code incompatible with other clients. Note that the pointer
marshalling/unmarshalling functions didn't actually read/write pointer
IDs to/from the reserved space in the buffer.
2008-07-04 19:49:00 +02:00
Rob Shearman
5887be5717 rpcrt4: Implement memory sizing for pointers in complex types. 2008-07-04 19:48:47 +02:00
Rob Shearman
81b4436add rpcrt4: The conformant array offset in complex structs should be signed. 2008-07-04 19:48:38 +02:00
Rob Shearman
44649e855a rpcrt4: Fix NdrComplexArrayUnmarshall and NdrComplexStructUnmarshall to reuse memory for embedded pointers. 2008-07-04 19:48:30 +02:00
Rob Shearman
517844e054 rpcrt4: Support calculating the size in memory of range types embedded in complex types. 2008-07-04 19:47:58 +02:00
Rob Shearman
0c095ee0d3 rpcrt4: Fix NdrConformantVaryingStructUnmarshall to use buffer memory if applicable and to reuse memory for embedded pointers. 2008-06-23 19:46:29 +02:00