mscorlib(4.0.0.0) API with additions
IStream.cs
2 {
4  [ComImport]
5  [Guid("0000000c-0000-0000-C000-000000000046")]
6  [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
7  [__DynamicallyInvokable]
8  public interface IStream
9  {
14  void Read([Out] [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] pv, int cb, IntPtr pcbRead);
15 
20  void Write([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] pv, int cb, IntPtr pcbWritten);
21 
26  void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition);
27 
30  [__DynamicallyInvokable]
31  void SetSize(long libNewSize);
32 
38  void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten);
39 
42  [__DynamicallyInvokable]
43  void Commit(int grfCommitFlags);
44 
46  [__DynamicallyInvokable]
47  void Revert();
48 
53  [__DynamicallyInvokable]
54  void LockRegion(long libOffset, long cb, int dwLockType);
55 
60  [__DynamicallyInvokable]
61  void UnlockRegion(long libOffset, long cb, int dwLockType);
62 
66  [__DynamicallyInvokable]
67  void Stat(out STATSTG pstatstg, int grfStatFlag);
68 
71  [__DynamicallyInvokable]
72  void Clone(out IStream ppstm);
73  }
74 }
void LockRegion(long libOffset, long cb, int dwLockType)
Restricts access to a specified range of bytes in the stream.
void Read([Out] [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] byte[] pv, int cb, IntPtr pcbRead)
Reads a specified number of bytes from the stream object into memory starting at the current seek poi...
Provides the managed definition of the IStream interface, with ISequentialStream functionality.
Definition: IStream.cs:8
Contains statistical information about an open storage, stream, or byte-array object.
Definition: STATSTG.cs:6
void Commit(int grfCommitFlags)
Ensures that any changes made to a stream object that is open in transacted mode are reflected in the...
void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten)
Copies a specified number of bytes from the current seek pointer in the stream to the current seek po...
UnmanagedType
Identifies how to marshal parameters or fields to unmanaged code.
Definition: UnmanagedType.cs:7
A platform-specific type that is used to represent a pointer or a handle.
Definition: IntPtr.cs:14
void UnlockRegion(long libOffset, long cb, int dwLockType)
Removes the access restriction on a range of bytes previously restricted with the M:System....
void SetSize(long libNewSize)
Changes the size of the stream object.
void Revert()
Discards all changes that have been made to a transacted stream since the last M:System....
void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition)
Changes the seek pointer to a new location relative to the beginning of the stream,...
ComInterfaceType
Identifies how to expose an interface to COM.
void Write([MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] byte[] pv, int cb, IntPtr pcbWritten)
Writes a specified number of bytes into the stream object starting at the current seek pointer.
void Clone(out IStream ppstm)
Creates a new stream object with its own seek pointer that references the same bytes as the original ...
void Stat(out STATSTG pstatstg, int grfStatFlag)
Retrieves the T:System.Runtime.InteropServices.STATSTG structure for this stream.