This method attempts to skip over the next celt elements in the enumeration sequence.
At a Glance
Header file: | Oaidl.h |
Windows CE versions: | 2.0 and later |
Syntax
HRESULT Skip( unsigned long celt );
Parameters
celt
Number of elements to skip.
Return Values
One of the values described in the following table is returned.
Value | Description |
S_OK | The specified number of elements was skipped. |
S_FALSE | The end of the sequence was reached before skipping the requested number of elements. |
Example
The following code implements IEnumVariant::Skip for collections in the Lines sample file Enumvar.cpp.
STDMETHODIMP
CEnumVariant::Skip(ULONG cElements)
{
m_lCurrent += cElements;
if (m_lCurrent > (long)(m_lLBound+m_cElements))
{
m_lCurrent = m_lLBound+m_cElements;
return ResultFromScode(S_FALSE);
}
else return NOERROR;
}