語言

PrintQueueStream.BeginWrite 方法

定義

開始異步寫入作業。

public:
 override IAsyncResult ^ BeginWrite(cli::array <System::Byte> ^ buffer, int offset, int count, AsyncCallback ^ callback, System::Object ^ state);
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state);
override this.BeginWrite : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginWrite (buffer As Byte(), offset As Integer, count As Integer, callback As AsyncCallback, state As Object) As IAsyncResult

參數

buffer
Byte[]

用來寫入資料的緩衝區。

offset
Int32

緩衝區中開始寫入的位元組偏移量。

count
Int32

最大可寫入位元組數。

callback
AsyncCallback

非同步回調,當寫入操作完成時會被呼叫。

state
Object

一個使用者提供的物件,用來區分此非同步寫入請求與其他請求。

傳回

一個 IAsyncResult 代表非同步寫入,可能還在待處理中。

適用於