[]
An implementation of the IStream interface wrapping up a System.IO.Stream.
[Guid("0000000c-0000-0000-C000-000000000046")]
public class ComStreamProxy : CallbackBase, IStream, IStreamBase, ICallbackable, IDisposable
Creates an instance of ComStreamProxy for the given sourceStream.
public ComStreamProxy(Stream sourceStream)
sourceStream
System.IO.StreamClones this instance.
public 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.
public void Commit(CommitFlags commitFlags)
commitFlags
CommitFlagsCopies a specified number of bytes from the current seek pointer in the stream to the current seek pointer in another stream.
public long CopyTo(IStream streamDest, long numberOfBytesToCopy, out long bytesWritten)
streamDest
IStreamnumberOfBytesToCopy
longbytesWritten
longClean up any resources being used.
protected override void Dispose(bool disposing)
disposing
boolGets the statistics.
public StorageStatistics GetStatistics(StorageStatisticsFlags storageStatisticsFlags)
storageStatisticsFlags
StorageStatisticsFlagsNot implemented.
public void LockRegion(long offset, long numberOfBytesToLock, LockType dwLockType)
offset
longnumberOfBytesToLock
longdwLockType
LockTypeReads a specified number of bytes from the stream object into memory starting at the current seek pointer.
public int Read(IntPtr buffer, int numberOfBytesToRead)
buffer
System.IntPtrnumberOfBytesToRead
intNot implemented.
public 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.
public long Seek(long offset, SeekOrigin origin)
offset
longorigin
System.IO.SeekOriginChanges the size of the stream object.
public void SetSize(long newSize)
newSize
longNot implemented.
public void UnlockRegion(long offset, long numberOfBytesToLock, LockType dwLockType)
offset
longnumberOfBytesToLock
longdwLockType
LockTypeWrites a specified number of bytes into the stream object starting at the current seek pointer.
public int Write(IntPtr buffer, int numberOfBytesToWrite)
buffer
System.IntPtrnumberOfBytesToWrite
int