WsSetOutputToBuffer function (webservices.h)

This operation positions the Writer at the end of the specified buffer.

When an XML Writer has an XML Buffer set as output the Writer can be used in a "random access" fashion and the functions WsGetWriterPosition, WsSetWriterPosition and WsMoveWriter can be used.

Properties specified for this function override those specified with the WsCreateWriter function.

Note  See WsCreateWriter for the default values of the properties of the writer.

 

Syntax

HRESULT WsSetOutputToBuffer(
  [in]           WS_XML_WRITER                *writer,
  [in]           WS_XML_BUFFER                *buffer,
                 const WS_XML_WRITER_PROPERTY *properties,
  [in]           ULONG                        propertyCount,
  [in, optional] WS_ERROR                     *error
);

Parameters

[in] writer

A pointer to the WS_XML_WRITER object for which the output is set. The pointer must reference a valid XML Writer object.

[in] buffer

A pointer to the buffer where the Writer sends the data.

properties

A WS_XML_WRITER_PROPERTY pointer that references an "array" of optional Writer 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

This function can return one of these values.

Return code Description
E_INVALIDARG
One or more arguments are invalid.

Remarks

See WsCreateWriter for the default values of the properties of the writer.

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