WsSetInput function (webservices.h)

Sets the encoding and input sources for an XML Reader. These settings override settings made when the Reader was created.

Note  If both encoding and input are NULL the reader will operate as if it is positioned at the end of an empty XML document.



  [in]           WS_XML_READER                *reader,
  [in, optional] const WS_XML_READER_ENCODING *encoding,
  [in, optional] const WS_XML_READER_INPUT    *input,
                 const WS_XML_READER_PROPERTY *properties,
  [in]           ULONG                        propertyCount,
  [in, optional] WS_ERROR                     *error


[in] reader

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

[in, optional] encoding

A to an encoding value that describes the format of the input bytes. This value should be one of:

[in, optional] input

A pointer to a WS_XML_READER_INPUT structure that indicates the reader type.


An array reference of optional Reader properties.

[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.


When WsSetInput is used on the XML Reader, the reader will function in a forward only manner and the functions WsGetReaderPosition, WsSetReaderPosition and WsMoveReader cannot be used.


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