WsSetInputToBuffer function (webservices.h)

Sets Reader input to a specified XML buffer. Reader properties specified to WsSetInputToBuffer override properties set by WsCreateReader.

The reader does not modify WS_XML_BUFFER input data.

Note  It is permissible for more than one reader to read from the same WS_XML_BUFFER.

 

Syntax

HRESULT WsSetInputToBuffer(
  [in]           WS_XML_READER                *reader,
  [in]           WS_XML_BUFFER                *buffer,
                 const WS_XML_READER_PROPERTY *properties,
  [in]           ULONG                        propertyCount,
  [in, optional] WS_ERROR                     *error
);

Parameters

[in] reader

A pointer to the WS_XML_READER object for which the input will be set.

[in] buffer

A pointer to the XML buffer to read.

properties

A pointer that references an array of optional Reader properties.

Note  For more information see WS_XML_READER_PROPERTY.

 
.

[in] propertyCount

The number of properties.

[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

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

When an XML Reader has an XML Buffer as an input source, the Reader can be used in a random access fashion, and the functions WsGetReaderPosition, WsSetReaderPosition, and WsMoveReader are available for use.

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