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.
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.
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.
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.
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.
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.
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).
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.
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.
- Fix discrepancy between headers and implementation of
I_RpcBindingSetAsync when compiling under WINNT.
- Eliminate race conditions in the relationship between "listen_count"
and "std_listen" in rpc_server.h.
- Code-stubs for RpcServerUnregisterIf, RpcServerUnregisterIfEx.
- Attempt to implement RpcMgmtStopServerListening (definitely not
happy just yet).
- RpcServerUnregisterIfEx wasn't xp-sepcific after all; this leads me to
suspect there are more such mistakes in the spec-file comments, but I
haven't looked into it or fixed them yet (coming soon).
- Cleanups, trace-enhancements, etc.
code.
- Add some assertions where assumptions are made (need way more).
- Plug the binding handle into the RPC_MESSAGE during NdrGetBuffer.
- Implement NdrSendReceive.
- Attempt to support client and server bindings in I_RpcSend[Receive].
- Implement NdrGetBuffer, NdrFreeBuffer, NdrConformantStringBufferSize
and NdrConformantStringMarshall.
- Define the RPC_FC_C_CSTRING constant.
- Perhaps I don't want those MIDL_*_FORMAT_STRING structs, after
all. Removed.
- Add RPC todo list.
- MIDL_STUB_MESSAGE.uFlags aren't.
- Comment out the NdrClientCall2 mock-up since that stuff is in the
process of being implemented and might cause problems.
- Move NdrConformantStringMarshall to new ndr_marshall.c.
- Stubs for NdrConformantStringBufferSize,
NdrConformantStringMemorySize, and NdrConformantStringUnmarshall.