WsMarkHeaderAsUnderstood function (webservices.h)

This function marks a header as "understood" by the application.

The set of headers is extensible and Message assimilation by the receiver is not accessible by the sender. This function is the receiving applications method for making it known to the sender that the received header has been read and understood.

Note  This function should be used only if the application receives a message indicating that the header must be understood and it did not acquire the header using WsGetHeader or WsGetCustomHeader.

The WS_MESSAGE_STATE must be in the set to WS_MESSAGE_STATE_READING. See .WsCheckMustUnderstandHeaders for more information.

 

Syntax

HRESULT WsMarkHeaderAsUnderstood(
  [in]           WS_MESSAGE                 *message,
  [in]           const WS_XML_NODE_POSITION *headerPosition,
  [in, optional] WS_ERROR                   *error
);

Parameters

[in] message

A pointer to the Message object with the header to mark.

[in] headerPosition

A pointer to the position of the header element within the XML header segment.

[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
WS_E_INVALID_OPERATION
The message is not in the correct state.
E_INVALIDARG
One or more arguments are invalid.
E_OUTOFMEMORY
Ran out of memory.
Other Errors
This function may return other errors not listed above.

Remarks

When the application reads the header using an XML Reader, it should obtain a WS_XML_NODE_POSITION of the header element and pass it to this function. See WsGetReaderPosition for how to obtain a WS_XML_NODE_POSITION.

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