IBitsPeerCacheAdministration::SetConfigurationFlags method (bits3_0.h)
Sets the configuration flags that determine if the computer can serve content to peers and can download content from peers.
Syntax
HRESULT SetConfigurationFlags(
[in] DWORD Flags
);
Parameters
[in] Flags
Flags that determine if the computer can serve content to peers and can download content from peers. The following flags can be set:
Value | Meaning |
---|---|
|
The computer can download content from peers.
BITS will not download files from a peer unless both the client computer and the job permit BITS to download files from a peer. To permits the job to download files from a peer, call the IBackgroundCopyJob4::SetPeerCachingFlags method and set the BG_JOB_ENABLE_PEERCACHING_CLIENT flag. Note that changing this value can affect all jobs on the computer. If one of the following conditions exists, BITS will stop the download and reschedule the job to begin transferring from either a peer or the origin server, depending on the value for the job and the cache:
|
|
The computer can serve content to peers.
BITS will not cache the files and serve them to peers unless both the client computer and job permit BITS to cache and serve files. To permit the job to cache files for a job, call the IBackgroundCopyJob4::SetPeerCachingFlags method and set the BG_JOB_ENABLE_PEERCACHING_SERVER flag. |
Return value
The method returns the following return values.
Return code | Description |
---|---|
|
Success |
|
The configuration preference has been saved successfully, but the preference will not be used because a configured Group Policy setting overrides the preference.
The method returns this value if the value set is different from the group policy value. If the values are the same, the method returns S_OK. |
Remarks
This value is used only if the EnablePeerCaching group policy is not set.
A job determines if it downloads content from a peer or serves its content to peers. For details, see the IBackgroundCopyJob4::SetPeerCachingFlags method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | bits3_0.h (include Bits.h) |
Library | Bits.lib |