OpenArchiveWriteStream Method (archiveNumber, archiveName, truncate, compressionEngine)

Microsoft Deployment Compression & Installer

Copy image CopyHover image
Deployment Tools Foundation OpenArchiveWriteStream Method (archiveNumber, archiveName, truncate, compressionEngine)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.CompressionArchiveFileStreamContextOpenArchiveWriteStream(Int32, String, Boolean, CompressionEngine)
Opens a stream for writing an archive.
Declaration Syntax
C# Visual Basic Visual C++
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
)
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
Stream
A writable Stream where the compressed archive bytes will be written, or null to cancel the archive creation.
Remarks
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.9.1006.0)