Export (0) Print
Expand All

SetOutput

Sets the output stream for the writer.


HRESULT SetOutput (IUnknown * pOutput);

pOutput

The output stream for the writer.

Returns S_OK if no error is generated.

IXmlWriter can accept several types of output stream:

A class derived from ISequentialStream

The writer will write the output to the provided ISequentialStream using the default UTF-8 encoding.

A class derived from IStream

The writer will write the output to the provided IStream using the default UTF-8 encoding.

IXmlWriterOutput

The writer will write the output to the stream and encoding specified by the IXmlWriterOutput object.

NULL

This resets the writer, releasing the previously set output object. This forces the writer to flush all the data into the stream, but does not force the stream itself to flush.

Use the Flush method to force the writer to write out all the buffered data to the output stream.

Header: XmlLite.h

Library: XmlLite.lib

Show:
© 2014 Microsoft