Export (0) Print
Expand All

IEnumVARIANT::Skip method

Attempts to skip over the next celt elements in the enumeration sequence.

Syntax


HRESULT Skip(
  [in]  ULONG celt
);

Parameters

celt [in]

The number of elements to skip.

Return value

This method can return one of these values.

Return codeDescription
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.

 

Examples

The following code implements IEnumVariant::Skip. A complete example implementation of the IEnumVariant interface is available in the COM Fundamentals Lines sample (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 S_FALSE;
   }
   else return NOERROR;
}


Requirements

IDL

OaIdl.idl

See also

IEnumVARIANT

 

 

Community Additions

ADD
Show:
© 2014 Microsoft