MesBufferHandleReset function (midles.h)
The MesBufferHandleReset function re-initializes the handle for buffer serialization.
Syntax
RPC_STATUS MesBufferHandleReset(
handle_t Handle,
unsigned long HandleStyle,
MIDL_ES_CODE Operation,
char **pBuffer,
unsigned long BufferSize,
unsigned long *pEncodedSize
);
Parameters
Handle
Handle to be initialized.
HandleStyle
Style of Handle. Valid styles are MES_FIXED_BUFFER_HANDLE or MES_DYNAMIC_BUFFER_HANDLE.
Operation
Operation code. Valid codes are MES_ENCODE, MES_ENCODE_NDR64, or MES_DECODE.
pBuffer
For MES_DECODE, pointer to a pointer to the buffer containing the data to be decoded.
For MES_ENCODE, pointer to a pointer to the buffer for fixed buffer style, and pointer to a pointer to return the buffer address for dynamic buffer style of serialization.
For MES_ENCODE_NDR64, pointer to a pointer to the buffer for fixed buffer style, and pointer to a pointer to return the buffer address for dynamic buffer style of serialization, but explicitly uses NDR64 to encode the buffer. The user-provided buffer must be aligned to 16.
BufferSize
Bytes of data to be decoded in the buffer. Note that this is used only for the fixed buffer style of serialization.
pEncodedSize
Pointer to the size of the completed encoding. Note that this is used only when the operation is MES_ENCODE or MES_ENCODE_NDR64.
Return value
Value | Meaning |
---|---|
|
The call succeeded. |
|
The argument was invalid. |
Remarks
The MesBufferHandleReset routine is used by applications to re-initialize a buffer style handle and save memory allocations.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | midles.h (include Rpc.h) |
Library | Rpcrt4.lib |
DLL | Rpcrt4.dll |
See also
MesEncodeDynBufferHandleCreate