[]
IStream
[Guid("0000000c-0000-0000-C000-000000000046")]
[Shadow(typeof(ComStreamShadow))]
public interface IStream : IStreamBase, ICallbackable, IDisposable
Clones this instance.
IStream Clone()
Commit method ensures that any changes made to a stream object open in transacted mode are reflected in the parent storage. If the stream object is open in direct mode, Commit has no effect other than flushing all memory buffers to the next-level storage object. The COM compound file implementation of streams does not support opening streams in transacted mode.
void Commit(CommitFlags commitFlags)
commitFlags
CommitFlagsThe GRF commit flags.
Copies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.
long CopyTo(IStream streamDest, long numberOfBytesToCopy, out long bytesWritten)
streamDest
IStreamThe stream destination.
numberOfBytesToCopy
longThe number of bytes to copy.
bytesWritten
longThe number of bytes written.
The number of bytes read
Gets the statistics.
StorageStatistics GetStatistics(StorageStatisticsFlags storageStatisticsFlags)
storageStatisticsFlags
StorageStatisticsFlagsThe storage statistics flags.
Restricts access to a specified range of bytes in the stream.
void LockRegion(long offset, long numberOfBytesToLock, LockType dwLockType)
offset
longThe offset.
numberOfBytesToLock
longThe number of bytes to lock.
dwLockType
LockTypeType of the dw lock.
Discards all changes that have been made to a transacted stream since the last Commit(CommitFlags) call.
void Revert()
Changes the seek pointer to a new location relative to the beginning of the stream, to the end of the stream, or to the current seek pointer.
long Seek(long offset, SeekOrigin origin)
offset
longThe offset.
origin
System.IO.SeekOriginThe origin.
The offset of the seek pointer from the beginning of the stream.
Changes the size of the stream object.
void SetSize(long newSize)
newSize
longThe new size.
Unlocks access to a specified range of bytes in the stream.
void UnlockRegion(long offset, long numberOfBytesToLock, LockType dwLockType)
offset
longThe offset.
numberOfBytesToLock
longThe number of bytes to lock.
dwLockType
LockTypeType of the dw lock.