![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Deployment Tools Foundation
OpenArchiveWriteStream Method (archiveNumber, archiveName, truncate, compressionEngine)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.Compression ► ArchiveFileStreamContext ► OpenArchiveWriteStream(Int32, String, Boolean, CompressionEngine)
Opens a stream for writing an archive.
![](collapse_all.gif)
C# | Visual Basic | Visual C++ | F# |
public virtual Stream OpenArchiveWriteStream( int archiveNumber, string archiveName, bool truncate, CompressionEngine compressionEngine )
Public Overridable Function OpenArchiveWriteStream ( archiveNumber As Integer, archiveName As String, truncate As Boolean, compressionEngine As CompressionEngine ) As Stream
public: virtual Stream^ OpenArchiveWriteStream( int archiveNumber, String^ archiveName, bool truncate, CompressionEngine^ compressionEngine )
abstract OpenArchiveWriteStream : archiveNumber : int * archiveName : string * truncate : bool * compressionEngine : CompressionEngine -> Stream override OpenArchiveWriteStream : archiveNumber : int * archiveName : string * truncate : bool * compressionEngine : CompressionEngine -> Stream
![](collapse_all.gif)
- 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.
![](collapse_all.gif)
Stream
A writable Stream where the compressed archive bytes will be written, or null to cancel the archive creation.
A writable Stream where the compressed archive bytes will be written, or null to cancel the archive creation.
![](collapse_all.gif)
This method opens the file from the ArchiveFiles list
with the specified index. If the archive number is outside the bounds
of the list, this method returns null.
If the EnableOffsetOpen flag is set, this method will seek to the start of any existing archive in the file, or to the end of the file if the existing file is not an archive.
Assembly: Microsoft.Deployment.Compression (Module: Microsoft.Deployment.Compression.dll) Version: 3.0.0.0 (3.11.1.2318)