MesBufferHandleReset

The MesBufferHandleReset function re-initializes the handle for buffer serialization.

#include <rpc.h>
#include <midles.h>
RPC_STATUS RPC_ENTRY MesBufferHandleReset( 
  handle_t  Handle,            
  unsigned long  HandleStyle,   
  MIDL_ES_CODE  OpCode,        
  char  *  *  ppBuffer,        
  unsigned long  BufferSize,   
  unsigned long *  pEncodedSize  
);
 

Parameters

Handle
The handle to be initialized.
HandleStyle
Specifies the style of handle. Valid styles are MES_FIXED_BUFFER_HANDLE or MES_DYNAMIC_BUFFER_HANDLE.
OpCode
Specifies the operation. Valid operations are MES_ENCODE or MES_DECODE.
ppBuffer
For MES_DECODE, points to a pointer to the buffer containing the data to be decoded.

For MES_ENCODE, points to a pointer to the buffer for fixed buffer style, and points to a pointer to return the buffer address for dynamic buffer style.

BufferSize
Specifies the number of bytes of data to be decoded in the buffer. Note that this is used only for the fixed buffer style of serialization.
pEncodedSize
Points to the size of the completed encoding. Note that this is used only when the operation is MES_ENCODE.

Remarks

The MesBufferHandleReset routine is used by applications to re-initialize a buffer style handle and save memory allocations.

Return Values

Value Meaning
RPC_S_OK Success
RPC_S_INVALID_ARG Invalid argument

QuickInfo

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

See Also

MesEncodeFixedBufferHandleCreate, MesEncodeDynBufferHandleCreate