Compartir a través de


IEnumVARIANT::Reset (Compact 2013)

3/26/2014

This method resets the enumeration sequence to the beginning.

Syntax

HRESULT Reset()

Return Value

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

Header

oaidl.h,
oaidl.idl

Library

oleaut32.lib,
uuid.lib

See Also

Reference

IEnumVARIANT