IEnumVARIANT::Reset

This method resets the enumeration sequence to the beginning.

HRESULT Reset()

Return Values

If the method succeeds, the return value is S_OK.

If the method fails, the return value is S_FALSE.

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 Reset for collections in the Lines sample file Enumvar.cpp.

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

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oaidl.h, Oaidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.

See Also

IEnumVARIANT

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.