Dynamic Buffer Serialization

When using the dynamic buffer style of serialization, the marshalling buffer is allocated by the stub and the data is encoded into this buffer and passed back to you. When unmarshalling, you supply the buffer that contains the data.

The dynamic buffer style of serialization uses the following routines:

MesEncodeDynBufferHandleCreate allocates the memory needed for the encoding handle and then initializes it. It has the following prototype:

RPC_STATUS RPC_ENTRY MesEncodeDynBufferHandleCreate (
    char **pBuffer,                 /* pointer to buffer containing
                                    /* encoded data */
    unsigned long *pEncodedSize,    /* pointer to size of buffer
                                    /* containing encoded data */
    handle_t *pHandle);             /* pointer to the new handle */
 

The application can call the MesBufferHandleReset function to reinitialize the handle, or it can call the MesHandleFree function to free the handle's memory. To create a decoding handle corresponding to the dynamic buffer encoding handle, use the MesDecodeBufferHandleCreate routine. For prototypes of these routines, see Fixed Buffer Serialization.