Deployment Tools Foundation
OpenArchiveWriteStream Method (archiveNumber, archiveName, truncate, compressionEngine)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.Compression ► IPackStreamContext ► OpenArchiveWriteStream(Int32, String, Boolean, CompressionEngine)
Opens a stream for writing an archive package.
Declaration Syntax
C# | Visual Basic | Visual C++ |
Stream OpenArchiveWriteStream( int archiveNumber, string archiveName, bool truncate, CompressionEngine compressionEngine )
Function OpenArchiveWriteStream ( _ archiveNumber As Integer, _ archiveName As String, _ truncate As Boolean, _ compressionEngine As CompressionEngine _ ) As Stream
Stream^ OpenArchiveWriteStream( int archiveNumber, String^ archiveName, bool truncate, CompressionEngine^ compressionEngine )
Parameters
- archiveNumber (Int32)
- The 0-based index of the archive within the chain.
- archiveName (String)
- The name of the archive that was returned by GetArchiveName(Int32).
- truncate (Boolean)
- True if the stream should be truncated when opened (if it already exists); false if an existing stream is being re-opened for writing additional data.
- compressionEngine (CompressionEngine)
- Instance of the compression engine doing the operations.
Return Value
A writable Stream where the compressed archive bytes will be
written, or null to cancel the archive creation.
Remarks
If this method returns null, the archive engine will throw a
FileNotFoundException.