BG_FILE_PROGRESS structure (bits.h)

Provides file-related progress information, such as the number of bytes transferred.

Syntax

typedef struct _BG_FILE_PROGRESS {
  UINT64 BytesTotal;
  UINT64 BytesTransferred;
  BOOL   Completed;
} BG_FILE_PROGRESS;

Members

BytesTotal

Size of the file in bytes. If BITS cannot determine the size of the file (for example, if the file or server does not exist), the value is BG_SIZE_UNKNOWN.

If you are downloading ranges from a file, BytesTotal reflects the total number of bytes you want to download from the file.

BytesTransferred

Number of bytes transferred.

Completed

For downloads, the value is TRUE if the file is available to the user; otherwise, the value is FALSE. Files are available to the user after calling the IBackgroundCopyJob::Complete method. If the Complete method generates a transient error, those files processed before the error occurred are available to the user; the others are not. Use the Completed member to determine if the file is available to the user when Complete fails.

For uploads, the value is TRUE when the file upload is complete; otherwise, the value is FALSE.

Remarks

To determine if BITS transferred the file, you can:

Note that the progress values will be set back to zero if the time stamp of the URL changes.

Requirements

Requirement Value
Minimum supported client Windows XP
Minimum supported server Windows Server 2003
Header bits.h

See also

BG_JOB_PROGRESS

BG_JOB_REPLY_PROGRESS

IBackgroundCopyFile::GetProgress

IBackgroundCopyJob3::AddFileWithRanges