APGen Documentation Previous Topic: Output.Logon Next Topic: Output.CanCreateDirs Parent Topic: Output Object    Output Object
Output.Stream
See Also:

The Output.Stream property sets/returns the output stream.

Syntax

VBScript:

Output.Stream [= stream]

JScript:

Output.Stream [= stream];

Parameters

stream An object that implements the IStream interface.

Notes

In C++, the object returned from Output.Stream can be QueryInterface()ed (using IID_IStream) to return an IStream*.  The IStream interface is described in the Microsoft Win32 SDK documentation.

The object returned by Output.Stream cannot be accessed by scripting languages or Visual Basic.  The IStream interface is not a COM automation interface.

Any stream object passed to Output.Stream must implement the IStream interface.  Otherwise, an error will be raised.

Output.Stream is used for one of several reasons:

  1. Sharing output streams between one or more APG scripts (see Pluggable Streams ).
  2. Sending generated content to a non-file repository.  For more information, see Pluggable Streams.
  3. Passing the output stream to a COM object.

If the Output.Stream property is read when Output.Buffer is True, the returned IStream is buffered.  When the IStream is buffered, the methods IStream::Commit and IStream::Revert can be used to flush and clear the buffer.

If the Output.Stream property is set when Output.Buffer is True, generated content is buffered before it is sent to the stream object.

When the Output.Stream property is set, the previous output stream is closed.

The VBScript syntax for manipulating the Output.Stream property is: When reading Output.Stream into a VBScript variable, you must use the Set keyword.  For example:

Dim oStm
Set oStm = Output.Stream

When writing to the Output.Stream property, you must not use the Set keyword.  For example:

Output.Stream = oStm

For an example using Output.Stream, see Pluggable Streams.

Applies To

Output Object