共用方式為


RandomAccessStream.CopyAndCloseAsync(IInputStream, IOutputStream) 方法

定義

將來來源資料流複製到目的地資料流程,並等候複製作業完成。

public:
 static IAsyncOperationWithProgress<unsigned long long, unsigned long long> ^ CopyAndCloseAsync(IInputStream ^ source, IOutputStream ^ destination);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperationWithProgress<uint64_t, uint64_t> CopyAndCloseAsync(IInputStream const& source, IOutputStream const& destination);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperationWithProgress<ulong,ulong> CopyAndCloseAsync(IInputStream source, IOutputStream destination);
function copyAndCloseAsync(source, destination)
Public Shared Function CopyAndCloseAsync (source As IInputStream, destination As IOutputStream) As IAsyncOperationWithProgress(Of ULong, ULong)

參數

source
IInputStream

要從中複製資料的資料流程。

destination
IOutputStream

要複製資料的資料流程。

傳回

IAsyncOperationWithProgress<UInt64,UInt64>

Windows.Foundation.IAsyncOperationWithProgress<unsigned long long,unsigned long long>

IAsyncOperationWithProgress<uint64_t,uint64_t>

位元組寫入器作業。 第一個整數代表寫入的位元組數目。 第二個整數代表寫入作業的進度。

屬性

備註

CopyAndCloseAsync 方法類似于 CopyAsync ,但也會在其非同步作業完成之前,先呼叫並等候輸出資料流程上的 FlushAsyncClose

適用於

另請參閱