BackgroundUploadProgress BackgroundUploadProgress BackgroundUploadProgress BackgroundUploadProgress BackgroundUploadProgress Struct


Contains status information about the upload operation.

public : struct BackgroundUploadProgress
struct winrt::Windows::Networking::BackgroundTransfer::BackgroundUploadProgress
public struct BackgroundUploadProgress
Public Structure BackgroundUploadProgress
var backgroundUploadProgress = {

   bytesReceived: /* Your value */,

   bytesSent: /* Your value */,

   hasResponseChanged: /* Your value */,

   hasRestarted: /* Your value */,

   status: /* Your value */,

   totalBytesToReceive: /* Your value */,

   totalBytesToSend: /* Your value */

Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


BytesReceived BytesReceived BytesReceived BytesReceived BytesReceived

The total number of bytes received. This value does not include bytes received as part of response headers. If the upload operation has restarted, this value may be smaller than in the previous progress report.

ulong BytesReceived;
ulong BytesReceived;
ulong BytesReceived;
BytesReceived As ulong;
var ulong = backgroundUploadProgress.bytesReceived;
backgroundUploadProgress.bytesReceived = ulong;

BytesSent BytesSent BytesSent BytesSent BytesSent

The total number of bytes sent. If the upload operation has restarted, this value may be smaller than in the previous progress report.

ulong BytesSent;
ulong BytesSent;
ulong BytesSent;
BytesSent As ulong;
var ulong = backgroundUploadProgress.bytesSent;
backgroundUploadProgress.bytesSent = ulong;

HasResponseChanged HasResponseChanged HasResponseChanged HasResponseChanged HasResponseChanged

TRUE if the upload request response has changed; otherwise, FALSE.

Whenever new response information is available due to a new request being invoked, this field is set to true. The application can then choose to read the new response information and update its state, if needed.

Platform::Boolean HasResponseChanged;
Platform::Boolean HasResponseChanged;
bool HasResponseChanged;
HasResponseChanged As bool;
var bool = backgroundUploadProgress.hasResponseChanged;
backgroundUploadProgress.hasResponseChanged = bool;

HasRestarted HasRestarted HasRestarted HasRestarted HasRestarted

true if a upload transfer operation has restarted; otherwise false.

Uploads cannot be resumed. Whenever a new request is sent to the server to restart the upload, this property is set to true in the first progress notification for the new request. After the first progress notification, HasRestarted is set to false in later notifications.

Platform::Boolean HasRestarted;
Platform::Boolean HasRestarted;
bool HasRestarted;
HasRestarted As bool;
var bool = backgroundUploadProgress.hasRestarted;
backgroundUploadProgress.hasRestarted = bool;

Status Status Status Status Status

The current status of the upload operation.

BackgroundTransferStatus Status;
BackgroundTransferStatus Status;
BackgroundTransferStatus Status;
Status As BackgroundTransferStatus;
var BackgroundTransferStatus = backgroundUploadProgress.status;
backgroundUploadProgress.status = BackgroundTransferStatus;

TotalBytesToReceive TotalBytesToReceive TotalBytesToReceive TotalBytesToReceive TotalBytesToReceive

The total number of bytes of data to upload. If this number is unknown, this value is set to 0.

ulong TotalBytesToReceive;
ulong TotalBytesToReceive;
ulong TotalBytesToReceive;
TotalBytesToReceive As ulong;
var ulong = backgroundUploadProgress.totalBytesToReceive;
backgroundUploadProgress.totalBytesToReceive = ulong;

TotalBytesToSend TotalBytesToSend TotalBytesToSend TotalBytesToSend TotalBytesToSend

The total number of bytes to upload.

ulong TotalBytesToSend;
ulong TotalBytesToSend;
ulong TotalBytesToSend;
TotalBytesToSend As ulong;
var ulong = backgroundUploadProgress.totalBytesToSend;
backgroundUploadProgress.totalBytesToSend = ulong;