WsResetMessage function (webservices.h)

Sets the Message state back to WS_MESSAGE_STATE_EMPTY. In this state the Message object can be reused.

Syntax

HRESULT WsResetMessage(
  [in]           WS_MESSAGE *message,
  [in, optional] WS_ERROR   *error
);

Parameters

[in] message

A pointer to the Message object to reset.

[in, optional] error

A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.

Return value

This function can return one of these values.

Return code Description
E_INVALIDARG
One or more arguments are invalid.

Remarks

When a message is reset, its underlying heap is reset.

Reusing a message object to receive or send multiple messages is generally more efficient than creating and freeing the message object for each message.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header webservices.h
Library WebServices.lib
DLL WebServices.dll