[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Storage.ComStreamProxy

Class ComStreamProxy

Namespace
GrapeCity.Documents.DX.Storage
Assembly
GcDocs.DX.Windows.dll

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
Inheritance
object
ComStreamProxy
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

ComStreamProxy(Stream)

Creates an instance of ComStreamProxy for the given sourceStream.

public ComStreamProxy(Stream sourceStream)

Parameters

sourceStream System.IO.Stream

Methods

Clone()

Clones this instance.

public IStream Clone()

Returns

IStream

Commit(CommitFlags)

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)

Parameters

commitFlags CommitFlags

CopyTo(IStream, long, out long)

Copies 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)

Parameters

streamDest IStream
numberOfBytesToCopy long
bytesWritten long

Returns

long

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

GetStatistics(StorageStatisticsFlags)

Gets the statistics.

public StorageStatistics GetStatistics(StorageStatisticsFlags storageStatisticsFlags)

Parameters

storageStatisticsFlags StorageStatisticsFlags

Returns

StorageStatistics

LockRegion(long, long, LockType)

Not implemented.

public void LockRegion(long offset, long numberOfBytesToLock, LockType dwLockType)

Parameters

offset long
numberOfBytesToLock long
dwLockType LockType

Read(IntPtr, int)

Reads a specified number of bytes from the stream object into memory starting at the current seek pointer.

public int Read(IntPtr buffer, int numberOfBytesToRead)

Parameters

buffer System.IntPtr
numberOfBytesToRead int

Returns

int

Revert()

Not implemented.

public void Revert()

Seek(long, SeekOrigin)

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)

Parameters

offset long
origin System.IO.SeekOrigin

Returns

long

SetSize(long)

Changes the size of the stream object.

public void SetSize(long newSize)

Parameters

newSize long

UnlockRegion(long, long, LockType)

Not implemented.

public void UnlockRegion(long offset, long numberOfBytesToLock, LockType dwLockType)

Parameters

offset long
numberOfBytesToLock long
dwLockType LockType

Write(IntPtr, int)

Writes a specified number of bytes into the stream object starting at the current seek pointer.

public int Write(IntPtr buffer, int numberOfBytesToWrite)

Parameters

buffer System.IntPtr
numberOfBytesToWrite int

Returns

int