WsSetReaderPosition function (webservices.h)

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

This function can only be used on a reader that is set to a WS_XML_BUFFER.

Syntax

HRESULT WsSetReaderPosition(
  [in]           WS_XML_READER              *reader,
  [in]           const WS_XML_NODE_POSITION *nodePosition,
  [in, optional] WS_ERROR                   *error
);

Parameters

[in] reader

A pointer to the WS_XML_READER object for which the current position is set. The pointer must reference a valid XML Reader object.

[in] nodePosition

A pointer to the position to set the Reader.

[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.
WS_E_INVALID_OPERATION
The operation is not allowed due to the current state of the object.

Remarks

See WS_XML_NODE_POSITION for more information on using positions.

This function cannot be used while canonicalizing. If WsStartReaderCanonicalization has been called, then it will return WS_E_INVALID_OPERATION. (See Windows Web Services Return Values.)

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