WsSetWriterPosition function (webservices.h)

Sets the current position of the writer. The position must have been obtained by a call to WsGetReaderPosition or WsGetWriterPosition.

Syntax

HRESULT WsSetWriterPosition(
  [in]           WS_XML_WRITER              *writer,
  [in]           const WS_XML_NODE_POSITION *nodePosition,
  [in, optional] WS_ERROR                   *error
);

Parameters

[in] writer

The writer for which the current position will be set.

[in] nodePosition

The position to set the writer to.

[in, optional] error

Specifies where additional error information 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.
WS_E_INVALID_OPERATION
The operation is not allowed due to the current state of the object.

Remarks

This can only be used on a writer that is set to an WS_XML_BUFFER.

When writing to a buffer, the position represents the xml node before which new data will be placed.

See WS_XML_NODE_POSITION for more information on using positions.

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