MesEncodeFixedBufferHandleCreate

The MesEncodeFixedBufferHandleCreate function creates an encoding handle and then initializes it for a fixed buffer style of serialization.

#include <rpc.h>
#include <midles.h>
RPC_STATUS RPC_ENTRY MesEncodeFixedBufferHandleCreate( 
  char *  Buffer,              
  unsigned long  BufferSize,   
  unsigned long *  pEncodedSize,   
  handle_t *  pHandle          
);
 

Parameters

Buffer
Points to the user-supplied buffer.
BufferSize
Specifies the size of the user-supplied buffer.
pEncodedSize
Specifies a pointer to the size of the completed encoding. The size will be written to the pointee by the subsequent encoding operation(s).
pHandle
Points to the newly-created handle.

Remarks

The MesEncodeFixedBufferHandleCreate routine is used by applications to create and initialize the handle for the fixed buffer style of encoding. When using the fixed buffer style of encoding, the user supplies a single buffer into which all the encoded data is placed. This buffer must have an address which is aligned at eight, and must be a multiple of eight bytes in size. Further, it must be large enough to hold an encoding of all the data, along with an encoding header for each routine being encoded.

When the handle is used for multiple encoding operations, the encoded size is cumulative.

Return Values

Value Meaning
RPC_S_OK Success
RPC_S_INVALID_ARG Invalid argument
RPC_S_OUT_OF_MEMORY Out of memory

QuickInfo

  Windows NT: Yes
  Windows CE: Unsupported.
  Header: Declared in midles.h.
  Import Library: Link with rpcrt4.lib.

See Also

MesDecodeBufferHandleCreate, MesHandleFree