Sdílet prostřednictvím


RandomAccessStream.CopyAndCloseAsync(IInputStream, IOutputStream) Method

Definition

Copies a source stream to a destination stream and waits for the copy operation to complete.

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)

Parameters

source
IInputStream

The stream to copy data from.

destination
IOutputStream

The stream to copy data to.

Returns

IAsyncOperationWithProgress<UInt64,UInt64>

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

IAsyncOperationWithProgress<uint64_t,uint64_t>

The byte writer operation. The first integer represents the number of bytes written. The second integer represents the progress of the write operation.

Attributes

Remarks

The CopyAndCloseAsync method is similar to CopyAsync but also calls and waits for FlushAsync and Close on the output stream before its asynchronous operation completes.

Applies to

See also