IBackgroundCopyFile2::GetFileRanges method

Retrieves the ranges that you want to download from the remote file.

Syntax

HRESULT GetFileRanges(
  [in, out] DWORD         *RangeCount,
  [out]     BG_FILE_RANGE **Ranges
);

Parameters

RangeCount [in, out]

Number of elements in Ranges.

Ranges [out]

Array of BG_FILE_RANGE structures that specify the ranges to download. When done, call the CoTaskMemFree function to free Ranges.

Return value

This method returns the following return values, as well as others.

Return code Description
S_OK
Success
S_FALSE
No ranges were specified or the job is an upload or upload-reply job. RangeCount is set to zero and Ranges is set to NULL.

Requirements

Requirement Value
Minimum supported client
Windows 10, version 1709 [desktop apps only]
Minimum supported server
Windows Server, version 1709 [desktop apps only]
Header
Deliveryoptimization.h
IDL
DeliveryOptimization.idl
Library
Dosvc.lib
DLL
Dosvc.dll
IID
IID_IBackgroundCopyFile2 is defined as 83e81b93-0873-474d-8a8c-f2018b1a939c

See also

BG_FILE_RANGE

IBackgroundCopyFile2