IEnumVARIANT::Reset

This method resets the enumeration sequence to the beginning.

At a Glance

Header file: Oaidl.h
Windows CE versions: 2.0 and later

Syntax

HRESULT Reset()

Return Values

One of the values described in the following table is returned.

Value Description
S_OK Success.
S_FALSE Failure.

Remarks

There is no guarantee that exactly the same set of variants will be enumerated the second time as was enumerated the first time. Although an exact duplicate is desirable, the outcome depends on the collection being enumerated. You may find that it is impractical for some collections to maintain this condition (for example, an enumeration of the files in a directory).

Example

The following code implements IEnumVariant::Reset for collections in the Lines sample file Enumvar.cpp:

STDMETHODIMP
CEnumVariant::Reset()
{
   m_lCurrent = m_lLBound;
   return NOERROR;
}