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  
);
 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.
The MesBufferHandleReset routine is used by applications to re-initialize a buffer style handle and save memory allocations.
| Value | Meaning | 
|---|---|
| RPC_S_OK | Success | 
| RPC_S_INVALID_ARG | Invalid argument | 
  Windows NT:  Yes
  Windows CE:  Unsupported.
  Header: Declared in midles.h.
  Import Library: Link with rpcrt4.lib.
MesEncodeFixedBufferHandleCreate, MesEncodeDynBufferHandleCreate