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

适用于

另请参阅