Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

MesBufferHandleReset function

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

Syntax


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

Handle to be initialized.

HandleStyle

Style of Handle. Valid styles are MES_FIXED_BUFFER_HANDLE or MES_DYNAMIC_BUFFER_HANDLE.

OpCode

Operation code. Valid codes are MES_ENCODE, MES_ENCODE_NDR64, or MES_DECODE.

ppBuffer

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

ValueMeaning
RPC_S_OK

The call succeeded.

RPC_S_INVALID_ARG

The argument was invalid.

 

Note  For a list of valid error codes, see RPC Return Values.

Remarks

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

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Midles.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

See also

MesEncodeFixedBufferHandleCreate
MesHandleFree
MesEncodeDynBufferHandleCreate

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.