IStream 介面

定義

提供 IStream 介面的 Managed 定義,具有 ISequentialStream 功能。

public interface class IStream
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IStream
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
[System.Runtime.InteropServices.Guid("0000000c-0000-0000-C000-000000000046")]
public interface IStream
public interface IStream
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IStream = interface
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
[<System.Runtime.InteropServices.Guid("0000000c-0000-0000-C000-000000000046")>]
type IStream = interface
type IStream = interface
Public Interface IStream
屬性

備註

如需詳細資訊,請參閱 IStreamISequentialStream 介面的檔。

當機器碼中的 COM 方法傳回 以外的 S_OK 時,Common Language Runtime 會擲回 HRESULT 例外狀況。 如需詳細資訊,請參閱 How to: Map HRESULTs and Exceptions

方法

Clone(IStream)

建立新的資料流物件,其搜尋指標會參考與原始資料流相同的位元組。

Commit(Int32)

確認在交易模式中對資料流物件所做的任何未完成變更,都會在父儲存中反映。

CopyTo(IStream, Int64, IntPtr, IntPtr)

從資料流中目前的搜尋指標將指定的位元組數目複製到另一個資料流中目前的搜尋指標。

LockRegion(Int64, Int64, Int32)

限制對資料流中指定範圍之位元組的存取。

Read(Byte[], Int32, IntPtr)

從資料流物件中將指定的位元組數目讀入記憶體中目前搜尋指標開始處。

Revert()

捨棄自上次 Commit(Int32) 呼叫後已對交易資料流所做的全部變更。

Seek(Int64, Int32, IntPtr)

將搜尋指標變更為相對於資料流開頭、資料流結尾或目前搜尋指標的新位置。

SetSize(Int64)

變更資料流物件的大小。

Stat(STATSTG, Int32)

擷取此資料流的 STATSTG 結構。

UnlockRegion(Int64, Int64, Int32)

移除之前使用 LockRegion(Int64, Int64, Int32) 方法限制的位元組範圍上的存取限制。

Write(Byte[], Int32, IntPtr)

將指定的位元組數目寫入資料流物件中目前搜尋指標開始處。

適用於

另請參閱