diff --git a/PInvoke/BITS/bits.cs b/PInvoke/BITS/bits.cs index 1cdbdb6a..4275f0b2 100644 --- a/PInvoke/BITS/bits.cs +++ b/PInvoke/BITS/bits.cs @@ -3343,517 +3343,6 @@ namespace Vanara.PInvoke BITS_JOB_PROPERTY_VALUE GetProperty(BITS_JOB_PROPERTY_ID PropertyId); } - /// - /// Use this interface to query or set several optional behaviors of a job. - /// To get this interface, call the IBackgroundCopyJob::QueryInterface method using as the interface identifier. - /// - /// - // https://msdn.microsoft.com/en-us/library/windows/desktop/hh446781(v=vs.85).aspx - [PInvokeData("Bits5_0.h", MSDNShortId = "hh446781", MinClient = PInvokeClient.Windows10)] - [ComImport, Guid("CF6784F7-D677-49FD-9368-CB47AEE9D1AD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IBackgroundCopyJob6 : IBackgroundCopyJob5 - { - /// Adds multiple files to a job. - /// Number of elements in paFileSet. - /// - /// Array of BG_FILE_INFO structures that identify the local and remote file names of the files to transfer. - /// - /// Upload jobs are restricted to a single file.If the array contains more than one element, or the job already contains a file, - /// the method returns BG_E_TOO_MANY_FILES. - /// - /// - new void AddFileSet([In] uint cFileCount, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] BG_FILE_INFO[] pFileSet); - - /// Adds a single file to the job. - /// - /// Null-terminated string that contains the name of the file on the server. For information on specifying the remote name, see - /// the RemoteName member and Remarks section of the BG_FILE_INFO structure. - /// - /// - /// Null-terminated string that contains the name of the file on the client. For information on specifying the local name, see - /// the LocalName member and Remarks section of the BG_FILE_INFO structure. - /// - new void AddFile([In, MarshalAs(UnmanagedType.LPWStr)] string RemoteUrl, [In, MarshalAs(UnmanagedType.LPWStr)] string LocalName); - - /// Retrieves an IEnumBackgroundCopyFiles interface pointer that you use to enumerate the files in a job. - /// - /// IEnumBackgroundCopyFiles interface pointer that you use to enumerate the files in the job. Release ppEnumFiles when done. - /// - new IEnumBackgroundCopyFiles EnumFiles(); - - /// - /// Suspends a job. New jobs, jobs that are in error, and jobs that have finished transferring files are automatically suspended. - /// - new void Suspend(); - - /// Activates a new job or restarts a job that has been suspended. - new void Resume(); - - /// - /// Deletes the job from the transfer queue and removes related temporary files from the client (downloads) and server (uploads). - /// - new void Cancel(); - - /// Ends the job and saves the transferred files on the client. - new void Complete(); - - /// Retrieves the identifier used to identify the job in the queue. - /// GUID that identifies the job within the BITS queue. - new Guid GetId(); - - /// Retrieves the type of transfer being performed, such as a file download or upload. - /// Type of transfer being performed. For a list of transfer types, see the BG_JOB_TYPE enumeration. - new BG_JOB_TYPE GetType(); - - /// Retrieves job-related progress information, such as the number of bytes and files transferred. - /// - /// Contains data that you can use to calculate the percentage of the job that is complete. For more information, see BG_JOB_PROGRESS. - /// - new BG_JOB_PROGRESS GetProgress(); - - /// Retrieves job-related time stamps, such as the time that the job was created or last modified. - /// Contains job-related time stamps. For available time stamps, see the BG_JOB_TIMES structure. - new BG_JOB_TIMES GetTimes(); - - /// Retrieves the state of the job. - /// - /// The state of the job. For example, the state reflects whether the job is in error, transferring data, or suspended. For a - /// list of job states, see the BG_JOB_STATE enumeration. - /// - new BG_JOB_STATE GetState(); - - /// - /// Retrieves the error interface after an error occurs. - /// - /// BITS generates an error object when the state of the job is BG_JOB_STATE_ERROR or BG_JOB_STATE_TRANSIENT_ERROR.The service - /// does not create an error object when a call to an IBackgroundCopyXXXX interface method fails.The error object is available - /// until BITS begins transferring data(the state of the job changes to BG_JOB_STATE_TRANSFERRING) for the job or until your - /// application exits. - /// - /// - /// - /// Error interface that provides the error code, a description of the error, and the context in which the error occurred. This - /// parameter also identifies the file being transferred at the time the error occurred. Release ppError when done. - /// - [return: MarshalAs(UnmanagedType.Interface)] - new IBackgroundCopyError GetError(); - - /// Retrieves the identity of the job's owner. - /// - /// Null-terminated string that contains the string version of the SID that identifies the job's owner. Call the CoTaskMemFree - /// function to free ppOwner when done. - /// - [return: MarshalAs(UnmanagedType.LPWStr)] - new string GetOwner(); - - /// Specifies a display name for the job. Typically, you use the display name to identify the job in a user interface. - /// - /// Null-terminated string that identifies the job. Must not be NULL. The length of the string is limited to 256 characters, not - /// including the null terminator. - /// - new void SetDisplayName([In, MarshalAs(UnmanagedType.LPWStr)] string pDisplayName); - - /// Retrieves the display name for the job. Typically, you use the display name to identify the job in a user interface. - /// - /// Null-terminated string that contains the display name that identifies the job. More than one job can have the same display - /// name. Call the CoTaskMemFree function to free ppDisplayName when done. - /// - [return: MarshalAs(UnmanagedType.LPWStr)] - new string GetDisplayName(); - - /// Provides a description of the job. - /// - /// Null-terminated string that provides additional information about the job. The length of the string is limited to 1,024 - /// characters, not including the null terminator. - /// - new void SetDescription([In, MarshalAs(UnmanagedType.LPWStr)] string pDescription); - - /// Retrieves the description of the job. - /// - /// Null-terminated string that contains a short description of the job. Call the CoTaskMemFree function to free ppDescription - /// when done. - /// - [return: MarshalAs(UnmanagedType.LPWStr)] - new string GetDescription(); - - /// - /// Specifies the priority level of your job. The priority level determines when your job is processed relative to other jobs in - /// the transfer queue. - /// - /// - /// Specifies the priority level of your job relative to other jobs in the transfer queue. The default is BG_JOB_PRIORITY_NORMAL. - /// For a list of priority levels, see the BG_JOB_PRIORITY enumeration. - /// - new void SetPriority(BG_JOB_PRIORITY Priority); - - /// - /// Retrieves the priority level for the job. The priority level determines when the job is processed relative to other jobs in - /// the transfer queue. - /// - /// Priority of the job relative to other jobs in the transfer queue. - new BG_JOB_PRIORITY GetPriority(); - - /// Specifies the type of event notification you want to receive, such as job transferred events. - /// Set one or more of the following flags to identify the events that you want to receive. - new void SetNotifyFlags([In] BG_NOTIFY NotifyFlags); - - /// Retrieves the event notification flags for the job. - /// Identifies the events that your application receives. - new BG_NOTIFY GetNotifyFlags(); - - /// - /// Identifies your implementation of the IBackgroundCopyCallback interface to BITS. Use the IBackgroundCopyCallback interface to - /// receive notification of job-related events. - /// - /// - /// An IBackgroundCopyCallback interface pointer. To remove the current callback interface pointer, set this parameter to NULL. - /// - new void SetNotifyInterface(IBackgroundCopyCallback pNotifyInterface); - - /// Retrieves the interface pointer to your implementation of the IBackgroundCopyCallback interface. - /// Interface pointer to your implementation of the IBackgroundCopyCallback interface. When done, release ppNotifyInterface. - [return: MarshalAs(UnmanagedType.IUnknown)] - new object GetNotifyInterface(); - - /// - /// Sets the minimum length of time that BITS waits after encountering a transient error condition before trying to transfer the file. - /// - /// - /// Minimum length of time, in seconds, that BITS waits after encountering a transient error before trying to transfer the file. - /// The default retry delay is 600 seconds (10 minutes). The minimum retry delay that you can specify is 5 seconds. If you - /// specify a value less than 5 seconds, BITS changes the value to 5 seconds. If the value exceeds the no-progress-timeout value - /// retrieved from the GetNoProgressTimeout method, BITS will not retry the transfer and moves the job to the BG_JOB_STATE_ERROR state. - /// - new void SetMinimumRetryDelay([In] uint RetryDelay); - - /// - /// Retrieves the minimum length of time that the service waits after encountering a transient error condition before trying to - /// transfer the file. - /// - /// - /// Length of time, in seconds, that the service waits after encountering a transient error before trying to transfer the file. - /// - new uint GetMinimumRetryDelay(); - - /// - /// Sets the length of time that BITS tries to transfer the file after a transient error condition occurs. If there is progress, - /// the timer is reset. - /// - /// - /// Length of time, in seconds, that BITS tries to transfer the file after the first transient error occurs. The default retry - /// period is 1,209,600 seconds (14 days). Set the retry period to 0 to prevent retries and to force the job into the - /// BG_JOB_STATE_ERROR state for all errors. If the retry period value exceeds the JobInactivityTimeout Group Policy value - /// (90-day default), BITS cancels the job after the policy value is exceeded. - /// - new void SetNoProgressTimeout([In] uint RetryPeriod); - - /// - /// Retrieves the length of time that the service tries to transfer the file after a transient error condition occurs. If there - /// is progress, the timer is reset. - /// - /// Length of time, in seconds, that the service tries to transfer the file after a transient error occurs. - new uint GetNoProgressTimeout(); - - /// Retrieves the number of times BITS tried to transfer the job and an error occurred. - /// - /// Number of errors that occurred while BITS tried to transfer the job. The count increases when the job moves from the - /// BG_JOB_STATE_TRANSFERRING state to the BG_JOB_STATE_TRANSIENT_ERROR or BG_JOB_STATE_ERROR state. - /// - new uint GetErrorCount(); - - /// Specifies which proxy to use to transfer files. - /// - /// Specifies whether to use the user's proxy settings, not to use a proxy, or to use application-specified proxy settings. The - /// default is to use the user's proxy settings, BG_JOB_PROXY_USAGE_PRECONFIG. For a list of proxy options, see the - /// BG_JOB_PROXY_USAGE enumeration. - /// - /// - /// Null-terminated string that contains the proxies to use to transfer files. The list is space-delimited. For details on - /// specifying a proxy, see Remarks. - /// - /// This parameter must be NULL if the value of ProxyUsage is BG_JOB_PROXY_USAGE_PRECONFIG, BG_JOB_PROXY_USAGE_NO_PROXY, or BG_JOB_PROXY_USAGE_AUTODETECT. - /// - /// The length of the proxy list is limited to 4,000 characters, not including the null terminator. - /// - /// - /// Null-terminated string that contains an optional list of host names, IP addresses, or both, that can bypass the proxy. The - /// list is space-delimited. For details on specifying a bypass proxy, see Remarks. - /// - /// This parameter must be NULL if the value of ProxyUsage is BG_JOB_PROXY_USAGE_PRECONFIG, BG_JOB_PROXY_USAGE_NO_PROXY, or BG_JOB_PROXY_USAGE_AUTODETECT. - /// - /// The length of the proxy list is limited to 4,000 characters, not including the null terminator. - /// - new void SetProxySettings([In] BG_JOB_PROXY_USAGE ProxyUsage, [In, MarshalAs(UnmanagedType.LPWStr)] string ProxyList, [In, MarshalAs(UnmanagedType.LPWStr)] string ProxyBypassList); - - /// Retrieves the proxy information that the job uses to transfer the files. - /// - /// Specifies the proxy settings the job uses to transfer the files. For a list of proxy options, see the BG_JOB_PROXY_USAGE enumeration. - /// - /// - /// Null-terminated string that contains one or more proxies to use to transfer files. The list is space-delimited. For details - /// on the format of the string, see the Listing Proxy Servers section of Enabling Internet Functionality. Call the CoTaskMemFree - /// function to free ppProxyList when done. - /// - /// - /// Null-terminated string that contains an optional list of host names or IP addresses, or both, that were not routed through - /// the proxy. The list is space-delimited. For details on the format of the string, see the Listing the Proxy Bypass section of - /// Enabling Internet Functionality. Call the CoTaskMemFree function to free ppProxyBypassList when done. - /// - new void GetProxySettings(out BG_JOB_PROXY_USAGE pProxyUsage, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoTaskMemStringMarshaler))] out string pProxyList, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoTaskMemStringMarshaler))] out string pProxyBypassList); - - /// Changes ownership of the job to the current user. - new void TakeOwnership(); - - /// - /// Specifies a program to execute if the job enters the BG_JOB_STATE_ERROR or BG_JOB_STATE_TRANSFERRED state. BITS executes the - /// program in the context of the user who called this method. - /// - /// - /// Null-terminated string that contains the program to execute. The pProgram parameter is limited to MAX_PATH characters, not - /// including the null terminator. You should specify a full path to the program; the method will not use the search path to - /// locate the program. - /// - /// To remove command line notification, set pProgram and pParameters to NULL. The method fails if pProgram is NULL and - /// pParameters is non-NULL. - /// - /// - /// - /// Null-terminated string that contains the parameters of the program in pProgram. The first parameter must be the program in - /// pProgram (use quotes if the path uses long file names). The pParameters parameter is limited to 4,000 characters, not - /// including the null terminator. This parameter can be NULL. - /// - new void SetNotifyCmdLine([In, MarshalAs(UnmanagedType.LPWStr)] string Program, [In, MarshalAs(UnmanagedType.LPWStr)] string Parameters); - - /// Retrieves the program to execute when the job enters the error or transferred state. - /// - /// Null-terminated string that contains the program to execute when the job enters the error or transferred state. Call the - /// CoTaskMemFree function to free pProgram when done. - /// - /// - /// Null-terminated string that contains the arguments of the program in pProgram. Call the CoTaskMemFree function to free - /// pParameters when done. - /// - new void GetNotifyCmdLine([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoTaskMemStringMarshaler))] out string pProgram, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoTaskMemStringMarshaler))] out string pParameters); - - /// Retrieves progress information related to the transfer of the reply data from an upload-reply job. - /// - /// Contains information that you use to calculate the percentage of the reply file transfer that is complete. For more - /// information, see BG_JOB_REPLY_PROGRESS. - /// - new BG_JOB_REPLY_PROGRESS GetReplyProgress(); - - /// - /// Retrieves an in-memory copy of the reply data from the server application. Call this method only if the job's type is - /// BG_JOB_TYPE_UPLOAD_REPLY and its state is BG_JOB_STATE_TRANSFERRED. - /// - /// - /// Buffer to contain the reply data. The method sets ppBuffer to NULL if the server application did not return a reply. Call the - /// CoTaskMemFree function to free ppBuffer when done. - /// - /// Size, in bytes, of the reply data in ppBuffer. - new void GetReplyData(out SafeCoTaskMemHandle ppBuffer, out ulong pLength); - - /// - /// Specifies the name of the file to contain the reply data from the server application. Call this method only if the job's type - /// is BG_JOB_TYPE_UPLOAD_REPLY. - /// - /// - /// Null-terminated string that contains the full path to the reply file. BITS generates the file name if ReplyFileNamePathSpec - /// is NULL or an empty string. 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 permissions to write to the directory. - /// BITS 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. - /// - new void SetReplyFileName([In, MarshalAs(UnmanagedType.LPWStr)] string ReplyFileName); - - /// - /// Retrieves the name of the file that contains the reply data from the server application. Call this method only if the job - /// type is BG_JOB_TYPE_UPLOAD_REPLY. - /// - /// - /// Null-terminated string that contains the full path to the reply file. Call the CoTaskMemFree function to free pReplyFileName - /// when done. - /// - [return: MarshalAs(UnmanagedType.LPWStr)] - new string GetReplyFileName(); - - /// Specifies the credentials to use for a proxy or remote server user authentication request. - /// - /// Identifies the target (proxy or server), authentication scheme, and the user's credentials to use for user authentication. - /// For details, see the BG_AUTH_CREDENTIALS structure. - /// - new void SetCredentials(ref BG_AUTH_CREDENTIALS Credentials); - - /// - /// Removes credentials from use. The credentials must match an existing target and scheme pair that you specified using the - /// IBackgroundCopyJob2::SetCredentials method. There is no method to retrieve the credentials you have set. - /// - /// Identifies whether to use the credentials for proxy or server authentication. - /// - /// Identifies the authentication scheme to use (basic or one of several challenge-response schemes). For details, see the - /// BG_AUTH_SCHEME enumeration. - /// - new void RemoveCredentials(BG_AUTH_TARGET Target, BG_AUTH_SCHEME Scheme); - - /// Replaces the beginning text of all remote names in the download job with the specified string. - /// - /// Null-terminated string that identifies the text to replace in the remote name. The text must start at the beginning of the - /// remote name. - /// - /// Null-terminated string that contains the replacement text. - new void ReplaceRemotePrefix([In, MarshalAs(UnmanagedType.LPWStr)] string OldPrefix, [In, MarshalAs(UnmanagedType.LPWStr)] string NewPrefix); - - /// Adds a file to a download job and specifies the ranges of the file you want to download. - /// - /// Null-terminated string that contains the name of the file on the server. For information on specifying the remote name, see - /// the RemoteName member and Remarks section of the BG_FILE_INFO structure. Starting with BITS 3.0, the SMB protocol is not - /// supported for ranges. - /// BITS 2.5 and 2.0: BITS supports the SMB protocol for ranges. - /// - /// - /// Null-terminated string that contains the name of the file on the client. For information on specifying the local name, see - /// the LocalName member and Remarks section of the BG_FILE_INFO structure. - /// - /// Number of elements in Ranges. - /// - /// Array of one or more BG_FILE_RANGE structures that specify the ranges to download. Do not specify duplicate or overlapping ranges. - /// - new void AddFileWithRanges([In, MarshalAs(UnmanagedType.LPWStr)] string RemoteUrl, [In, MarshalAs(UnmanagedType.LPWStr)] string LocalName, [In] uint rangeCount, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] BG_FILE_RANGE[] ranges); - - /// Specifies the owner and ACL information to maintain when using SMB to download or upload a file. - /// - /// Flags that identify the owner and ACL information to maintain when transferring a file using SMB. Subsequent calls to this - /// method overwrite the previous flags. Specify 0 to remove the flags from the job. You can specify any combination of the - /// following flags. - /// - new void SetFileACLFlags([In] BG_COPY_FILE Flags); - - /// Retrieves the flags that identify the owner and ACL information to maintain when transferring a file using SMB. - /// - /// Flags that identify the owner and ACL information to maintain when transferring a file using SMB. Flags can contain any - /// combination of the following flags. If no flags are set, Flags is zero. - /// - new BG_COPY_FILE GetFileACLFlags(); - - /// - /// Sets flags that determine if the files of the job can be cached and served to peers and if the job can download content from peers. - /// - /// - /// Flags that determine if the files of the job can be cached and served to peers and if the job can download content from - /// peers. The following flags can be set: - /// - new void SetPeerCachingFlags(BG_JOB_ENABLE_PEERCACHING Flags); - - /// - /// Retrieves flags that determine if the files of the job can be cached and served to peers and if BITS can download content for - /// the job from peers. - /// - /// - /// Flags that determine if the files of the job can be cached and served to peers and if BITS can download content for the job - /// from peers. The following flags can be set: - /// - new BG_JOB_ENABLE_PEERCACHING GetPeerCachingFlags(); - - /// Gets the integrity level of the token of the owner that created or took ownership of the job. - /// Integrity level of the token of the owner that created or took ownership of the job. - new uint GetOwnerIntegrityLevel(); - - /// - /// Gets a value that determines if the token of the owner was elevated at the time they created or took ownership of the job. - /// - /// - /// Is TRUE if the token of the owner was elevated at the time they created or took ownership of the job; otherwise, FALSE. - /// - [return: MarshalAs(UnmanagedType.Bool)] - new bool GetOwnerElevationState(); - - /// Sets the maximum time that BITS will spend transferring the files in the job. - /// - /// Maximum time, in seconds, that BITS will spend transferring the files in the job. The default is 7,776,000 seconds (90 days). - /// - new void SetMaximumDownloadTime(uint Timeout); - - /// Retrieves the maximum time that BITS will spend transferring the files in the job. - /// Maximum time, in seconds, that BITS will spend transferring the files in the job. - new uint GetMaximumDownloadTime(); - - /// A generic method for setting BITS job properties. - /// The ID of the property that is being set specified as a BITS_JOB_PROPERTY_ID enum value. - /// - /// The value of the property that is being set. In order to hold a value whose type is appropriate to the property, this value - /// is specified via the BITS_JOB_PROPERTY_VALUE union that is composed of all the known property types. - /// - new void SetProperty(BITS_JOB_PROPERTY_ID PropertyId, BITS_JOB_PROPERTY_VALUE PropertyValue); - - /// A generic method for getting BITS job properties. - /// The ID of the property that is being obtained specified as a BITS_JOB_PROPERTY_ID enum value. - /// The property value returned as a BITS_JOB_PROPERTY_VALUE union. - new BITS_JOB_PROPERTY_VALUE GetProperty(BITS_JOB_PROPERTY_ID PropertyId); - - /// Specifies a position to prioritize downloading missing data from. - /// Specifies the new position to prioritize downloading missing data from. - /// - /// - /// UpdateDownloadPosition can be requested for any download job that also meets the requirements for - /// BITS_JOB_PROPERTY_ON_DEMAND_MODE jobs. - /// - /// - /// The requirements for a BITS_JOB_PROPERTY_ON_DEMAND_MODE job is that the transfer must be a DOWNLOAD job. The - /// job must not be DYNAMIC and the server must be an HTTP or HTTPS server and the server requirements for range support - /// must all be met. For more information, see HTTP Requirements for BITS Downloads. - /// - /// - // https://docs.microsoft.com/en-us/windows/win32/api/bits10_1/nf-bits10_1-ibackgroundcopyfile6-updatedownloadposition - // HRESULT UpdateDownloadPosition( [in] UINT64 offset ); - void UpdateDownloadPosition(ulong offset); - - /// Adds a new set of file ranges to be prioritized for download. - /// Specifies the size of the Ranges array. - /// - /// An array of file ranges to be downloaded. Requested ranges are allowed to overlap previously downloaded (or pending) ranges. - /// Ranges are automatically split into non-overlapping ranges. - /// - /// - /// - /// RequestFileRanges can be requested for any download job that also meets the requirements for - /// BITS_JOB_PROPERTY_ON_DEMAND_MODE jobs. - /// - /// - /// The requirements for a BITS_JOB_PROPERTY_ON_DEMAND_MODE job is that the transfer must be a DOWNLOAD job. The - /// job must not be DYNAMIC and the server must be an HTTP or HTTPS server and the server requirements for range support - /// must all be met. For more information, see HTTP Requirements for BITS Downloads. - /// - /// - /// When all of the requested ranges have been downloaded the job state will be set to BG_JOB_STATE_TRANSFERRED if all of - /// the bytes of the file have been transferred. Otherwise, the job state will be set to BG_JOB_STATE_SUSPENDED. - /// - /// - // https://docs.microsoft.com/en-us/windows/win32/api/bits10_1/nf-bits10_1-ibackgroundcopyfile6-requestfileranges - // HRESULT RequestFileRanges( [in] DWORD rangeCount, [in] const BG_FILE_RANGE [] ranges ); - void RequestFileRanges(uint rangeCount, [In, MarshalAs(UnmanagedType.LPArray)] BG_FILE_RANGE[] ranges); - - /// Returns the set of file ranges that have been downloaded. - /// The number of elements in Ranges. - /// - /// Array of BG_FILE_RANGE structures that describes the ranges that have been downloaded. Ranges will be merged together - /// as much as possible. The ranges are ordered by offset. When done, call the CoTaskMemFree function to free Ranges. - /// - /// - /// - /// GetFilledFileRanges can be requested for any download job that also meets the requirements for - /// BITS_JOB_PROPERTY_ON_DEMAND_MODE jobs. - /// - /// - /// The requirements for a BITS_JOB_PROPERTY_ON_DEMAND_MODE job is that the transfer must be a DOWNLOAD job. The - /// job must not be DYNAMIC and the server must be an HTTP or HTTPS server and the server requirements for range support - /// must all be met. For more information, see HTTP Requirements for BITS Downloads. - /// - /// - // https://docs.microsoft.com/en-us/windows/win32/api/bits10_1/nf-bits10_1-ibackgroundcopyfile6-getfilledfileranges - // HRESULT GetFilledFileRanges( [out] DWORD *rangeCount, [out] BG_FILE_RANGE **ranges ); - void GetFilledFileRanges(out uint rangeCount, out SafeCoTaskMemHandle ranges); - } - /// /// /// Use this interface to specify client certificates for certificate-based client authentication and custom headers for HTTP requests.