IEnumString

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This interface enumerates strings. The LPWSTR data type indicates a pointer to a zero-terminated string of wide, or Unicode, characters.

IEnumString has the same methods as all enumerator interfaces: Next, Skip, Reset, and Clone. For general information on these methods, refer to IEnumXXXX.

When to Implement

It is usually not necessary to implement this interface unless you have use for a custom string enumerator.

A system implementation in the bind context object that exposes the IBindCtx interface also contains an implementation of IEnumString.

The IBindCtx::EnumObjectParam method returns a pointer to this IEnumString interface on an enumerator that can return the keys of the bind context's string-keyed table of pointers.

When to Use

Call the methods of IEnumString to enumerate through a set of strings.

Methods

The following table shows the methods for this interface in vtable order.

IUnknown method Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

Method Description

Next

Retrieves a specified number of items in the enumeration sequence.

Skip

Skips a specified number of items in the enumeration sequence.

Reset

Resets the enumeration sequence to the beginning.

Clone

Creates another enumerator that contains the same enumeration state as the current one.

Remarks

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

Header objidl.h, objidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later