PersonalStorage.FromStream

FromStream(Stream, bool)

Opens a PST or OST from a stream.

public static PersonalStorage FromStream(Stream stream, bool writable)
ParameterTypeDescription
streamStreamThe stream with the PST or OST data.
writableBooleantrue to open the PST for reading and writing; false for reading only.

Return Value

The opened storage.

Remarks

The stream is closed when the storage is disposed. To keep it open, use the overload with PersonalStorageLoadOptions and set its LeaveStreamOpen property.

See Also


FromStream(Stream, PersonalStorageLoadOptions)

Opens a PST or OST from a stream with the specified options.

public static PersonalStorage FromStream(Stream stream, PersonalStorageLoadOptions loadOptions)
ParameterTypeDescription
streamStreamThe stream with the PST or OST data.
loadOptionsPersonalStorageLoadOptionsThe options for opening the stream.

Return Value

The opened storage.

Remarks

The PST is opened for writing only if PersonalStorageLoadOptions.Writable is true, which is not the default.

See Also


FromStream(Stream)

Opens a PST or OST from a stream for reading and writing.

public static PersonalStorage FromStream(Stream stream)
ParameterTypeDescription
streamStreamThe stream with the PST or OST data.

Return Value

The opened storage.

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null.

Remarks

The stream is closed when the storage is disposed. To keep it open, use the overload with PersonalStorageLoadOptions and set its LeaveStreamOpen property.

See Also