GetStream Method (field, filePath)

DTF API

Copy image CopyHover image
Deployment Tools Foundation GetStream Method (field, filePath)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerRecordGetStream(Int32, String)
Reads a record stream field into a file.
Declaration Syntax
C# Visual Basic Visual C++ F#
public void GetStream(
	int field,
	string filePath
)
Public Sub GetStream ( 
	field As Integer,
	filePath As String
)
public:
void GetStream(
	int field, 
	String^ filePath
)
member GetStream : 
        field : int * 
        filePath : string -> unit 
Parameters
field (Int32)
Specifies the field of the Record to get.
filePath (String)
Specifies the path to the file to contain the stream.
Remarks

This method is capable of directly extracting substorages. To do so, first select both the `Name` and `Data` column of the `_Storages` table, then get the stream of the `Data` field. However, substorages may only be extracted from a database that is open in read-only mode.

Win32 MSI API: MsiRecordReadStream

Exceptions
Exception Condition
ArgumentOutOfRangeException The field is less than 0 or greater than the number of fields in the Record.
NotSupportedException Attempt to extract a storage from a database open in read-write mode, or from a database without an associated file path

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)