BG_FILE_PROGRESS structure
The BG_FILE_PROGRESS structure 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:
- Compare BytesTransferred to BytesTotal.
- Implement the IBackgroundCopyCallback2::FileTransferred callback.
Note that the progress values will be set back to zero if the time stamp of the URL changes.
Requirements
|
Minimum supported client | Windows XP, Windows 2000 Professional with SP3 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only] |
|
Header |
|
See also
- BG_JOB_PROGRESS
- BG_JOB_REPLY_PROGRESS
- IBackgroundCopyFile::GetProgress
- IBackgroundCopyJob3::AddFileWithRanges
Send comments about this topic to Microsoft
Build date: 11/12/2012