Share via


IEnumItemIds::Next

When overridden in a derived class, returns the next element in the item ID list, if it is available.

HRESULT Next(
  BYTE * pbItemId,
  DWORD * pcbItemIdSize);

Parameters

  • pbItemId
    [in, out, unique, size_is(*pcbItemIdSize)] The next item ID in the list.
  • pcbItemIdSize
    [in, out] Specifies the number of bytes in pbItemId. Returns either the number of bytes that are required to retrieve the ID when pbItemId is too small, or the number of bytes written.

Return Value

  • S_OK.

  • S_FALSE if there are no more elements to retrieve.

  • HRESULT_FROM_WIN32(ERROR_MORE_DATA) when pbItemId is too small. In this situation, the required number of bytes is returned in pcbItemIdSize.

  • Provider-specified error codes.

Remarks

The first time Sync Framework calls this method, it specifies NULL for pbItemId and 0 for pcbItemIdSize. In this case, the implementation must return the correct size for the item ID in pcbItemIdSize, and an error code of HRESULT_FROM_WIN32(ERROR_MORE_DATA).

See Also

Reference

IEnumItemIds Interface