The MesEncodeDynBufferHandleCreate function creates an encoding handle and then initializes it for a dynamic buffer style of serialization.
#include <rpc.h>
#include <midles.h>
RPC_STATUS RPC_ENTRY MesEncodeDynBufferHandleCreate(
char * * ppBuffer,
unsigned long * pEncodedSize,
handle_t * pHandle
);
The MesEncodeDynBufferHandleCreate routine is used by applications to allocate the memory and initialize the handle for the dynamic buffer style of encoding. When using the dynamic buffer style of encoding, the buffer into which all the encoded data will be placed is supplied by the stub. This buffer will be allocated by the current client memory-management mechanism.
There can be performance implications when using this style for multiple encodings with the same handle. A single buffer is returned from an encoding and data is copied from intermediate buffers. The buffers are released when necessary.
Value | Meaning |
---|---|
RPC_S_OK | Success |
RPC_S_INVALID_ARG | Invalid argument |
RPC_S_OUT_OF_MEMORY | Out of memory |
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in midles.h.
Import Library: Link with rpcrt4.lib.
MesBufferHandleReset, MesHandleFree