ICoreFragment::NextRange method (winsync.h)

Returns the next range that is contained in this knowledge fragment, and the clock vector that defines what is known about the items in the range.

Syntax

HRESULT NextRange(
  [in, out] BYTE         *pItemId,
  [in, out] DWORD        *pItemIdSize,
  [out]     IClockVector **piClockVector
);

Parameters

[in, out] pItemId

Returns the closed lower bound of item IDs in this range. This value is also the open upper bound of item IDs in the previous range when it is not the first in the range set.

[in, out] pItemIdSize

Specifies the number of bytes in pItemId. Returns the number of bytes written, or the number of bytes that are required to retrieve the ID when pItemId is too small.

[out] piClockVector

Returns the clock vector that defines what is known about the items in the range.

Return value

The possible return codes include, but are not limited to, the values shown in the following table.

Return code Description
S_OK
The method succeeded.
S_FALSE
There are no more ranges to enumerate.
E_POINTER
The item ID is a variable-length ID and pItemIdSize is NULL.
HRESULT_FROM_WIN32(ERROR_MORE_DATA)
pItemId is too small. In this situation, the required number of bytes is returned in pItemIdSize.
SYNC_E_INVALID_OPERATION
The knowledge object that is contained in this object has changed since this object was created.

Remarks

The value that is returned in pItemId is the closed lower bound on the range of item IDs that are associated with the clock vector that is returned in piClockVector. The value of pItemId also defines the open upper bound of the previous range, so the open upper bound of the current range can be obtained by calling NextRange again. If there are no more ranges to enumerate, the range contains all items that have IDs greater than or equal to pItemId.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header winsync.h

See also

ICoreFragment Interface