DataWriterStoreOperation DataWriterStoreOperation DataWriterStoreOperation DataWriterStoreOperation DataWriterStoreOperation Class


Commits data in a buffer to a backing store.

public : sealed class DataWriterStoreOperation : IAsyncInfo, IAsyncOperation<unsigned int>
struct winrt::Windows::Storage::Streams::DataWriterStoreOperation : IAsyncInfo, IAsyncOperation<unsigned int>
public sealed class DataWriterStoreOperation : IAsyncInfo, IAsyncOperation<UInt32>
Public NotInheritable Class DataWriterStoreOperation Implements IAsyncInfo, IAsyncOperation<UInt32>
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


Completed Completed Completed Completed Completed

Gets or sets the handler to call when the data store operation is complete.

public : AsyncOperationCompletedHandler<unsigned int> Completed { get; set; }
AsyncOperationCompletedHandler<uint32_t> Completed(); void Completed(AsyncOperationCompletedHandler<uint32_t> completed);
public AsyncOperationCompletedHandler<uint> Completed { get; set; }
Public ReadWrite Property Completed As AsyncOperationCompletedHandler<uint>
var asyncOperationCompletedHandler = dataWriterStoreOperation.completed;
dataWriterStoreOperation.completed = asyncOperationCompletedHandler;

ErrorCode ErrorCode ErrorCode ErrorCode ErrorCode

Gets the error code for the data store operation if it fails.

public : HResult ErrorCode { get; }
HResult ErrorCode();
public Exception ErrorCode { get; }
Public ReadOnly Property ErrorCode As Exception
var exception = dataWriterStoreOperation.errorCode;
Exception Exception Exception

The status of the operation.

Id Id Id Id Id

Gets a unique identifier that represents the data store operation.

public : unsigned int Id { get; }
uint32_t Id();
public uint Id { get; }
Public ReadOnly Property Id As uint
var uint =;
uint uint uint

The identifier.

Status Status Status Status Status

Gets the current status of the data store operation.

public : AsyncStatus Status { get; }
AsyncStatus Status();
public AsyncStatus Status { get; }
Public ReadOnly Property Status As AsyncStatus
var asyncStatus = dataWriterStoreOperation.status;
AsyncStatus AsyncStatus AsyncStatus

One of the enumeration values.


Cancel() Cancel() Cancel() Cancel() Cancel()

Requests the cancellation of the data store operation.

public : void Cancel()
void Cancel() const;
public void Cancel()
Public Function Cancel() As void

Close() Close() Close() Close() Close()

Requests that work associated with the data store operation should stop.

public : void Close()
void Close() const;
public void Close()
Public Function Close() As void
// This member is not implemented in JavaScript

GetResults() GetResults() GetResults() GetResults() GetResults()

Returns the result of the data store operation.

public : unsigned int GetResults()
uint32_t GetResults() const;
public uint GetResults()
Public Function GetResults() As uint
var uint = dataWriterStoreOperation.getResults();
uint uint uint

The number of bytes returned by the StoreAsync method of the DataWriter.