Share via


BG_FILE_INFO structure

The BG_FILE_INFO structure provides the local and remote names of the file to transfer.

Syntax

typedef struct _BG_FILE_INFO {
  LPWSTR RemoteName;
  LPWSTR LocalName;
} BG_FILE_INFO;

Members

  • RemoteName
    Null-terminated string that contains the name of the file on the server (for example, https://<server>/<path>/file.ext). The format of the name must conform to the transfer protocol you use. You cannot use wildcards in the path or file name. The URL must contain only legal URL characters; no escape processing is performed. The URL is limited to 2,200 characters, not including the null terminator. Each segment of the URL is limited to MAX_PATH characters.

    You can use SMB to express the remote name of the file to download or upload; there is no SMB support for upload-reply jobs. You can specify the remote name as a UNC path, full path with a network drive, or use the "file://" prefix.

  • LocalName
    Null-terminated string that contains the name of the file on the client. The file name must include the full path (for example, d:\myapp\updates\file.ext). You cannot use wildcards in the path or file name, and directories in the path must exist. The path is limited to MAX_PATH, not including the null terminator.

    The user must have permission to write to the local directory for downloads and the reply portion of an upload-reply job. DO does not support NTFS streams. Instead of using network drives, which are session specific, use UNC paths (for example, \\server\share\path\file). Do not include the \\? prefix in the path.

Remarks

DO supports the HTTP, HTTPS, and SMB protocols for RemoteName. For HTTP requirements, see HTTP Requirements for DO Downloads.

The following identifies whether DO propagates a file's time stamps:

  • For HTTP downloads, DO propagates the file's modification time stamp and sets the file's creation time to the modification time.
  • For HTTP uploads, DO does not propagate the file's time stamps.
  • For SMB downloads and uploads, DO propagates the file's time stamps.

DO does not support SMB paths to named pipes or devices.

If the path and file name portion of the URL for an HTTP upload and upload-reply job contains Unicode characters not in common to the code page on both the client and server, the URL translation will fail on the server and the DO job will be placed in the error state. If the server portion of the URL contains Unicode characters, you must encode the server portion using Internationalized Domain Names (IDN).

DO does not limit the size of file you can download using HTTP. For upload limits, see the BITSMaximumUploadSize IIS extension property.

IIS 5.0: Downloads are limited to 4 GB.

Requirements

Minimum supported client

Windows 10, version 1709 [desktop apps only]

Minimum supported server

Windows Server 2016 [desktop apps only]

Header

Deliveryoptimization.h

See also

IBackgroundCopyFile::GetLocalName

IBackgroundCopyFile::GetRemoteName

IBackgroundCopyFile2::SetRemoteName

IBackgroundCopyJob::AddFileSet