IEnumVARIANT::Reset
A version of this page is also available for
4/8/2010
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 |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |