[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Storage.IStream

Interface IStream

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

IStream

[Guid("0000000c-0000-0000-C000-000000000046")]
[Shadow(typeof(ComStreamShadow))]
public interface IStream : IStreamBase, ICallbackable, IDisposable
Inherited Members
System.IDisposable.Dispose()

Methods

Clone()

Clones this instance.

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.

void Commit(CommitFlags commitFlags)

Parameters

commitFlags CommitFlags

The GRF commit flags.

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.

long CopyTo(IStream streamDest, long numberOfBytesToCopy, out long bytesWritten)

Parameters

streamDest IStream

The stream destination.

numberOfBytesToCopy long

The number of bytes to copy.

bytesWritten long

The number of bytes written.

Returns

long

The number of bytes read

GetStatistics(StorageStatisticsFlags)

Gets the statistics.

StorageStatistics GetStatistics(StorageStatisticsFlags storageStatisticsFlags)

Parameters

storageStatisticsFlags StorageStatisticsFlags

The storage statistics flags.

Returns

StorageStatistics

LockRegion(long, long, LockType)

Restricts access to a specified range of bytes in the stream.

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

Parameters

offset long

The offset.

numberOfBytesToLock long

The number of bytes to lock.

dwLockType LockType

Type of the dw lock.

Revert()

Discards all changes that have been made to a transacted stream since the last Commit(CommitFlags) call.

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.

long Seek(long offset, SeekOrigin origin)

Parameters

offset long

The offset.

origin System.IO.SeekOrigin

The origin.

Returns

long

The offset of the seek pointer from the beginning of the stream.

SetSize(long)

Changes the size of the stream object.

void SetSize(long newSize)

Parameters

newSize long

The new size.

UnlockRegion(long, long, LockType)

Unlocks access to a specified range of bytes in the stream.

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

Parameters

offset long

The offset.

numberOfBytesToLock long

The number of bytes to lock.

dwLockType LockType

Type of the dw lock.