Home COM GDI+ WebBrowser Data Access

IEnumString Interface

 

IID_IEnumString

{00000101-0000-0000-C000-000000000046}

 

 

IEnumString is defined to enumerate strings. LPWSTR is the type that indicates a pointer to a zero-terminated string of wide, or Unicode, characters.
 

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

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IEnumString Methods

Description

Next

Gets the next items in the enumeration sequence.

Skip

Attempts to skip over the next celt elements in the enumeration sequence.

Reset

Resets the enumeration sequence to the beginning.

Clone

Creates a copy of the current state of enumeration.

 

Next

 

FUNCTION IEnumString_Next ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL celt AS DWORD _

, BYVAL rgelt AS DWORD _

, BYREF pceltFetched AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IEnumString_Next (pthis, celt, rgelt, pceltFetched) TO HRESULT
  FUNCTION = HRESULT
 

END FUNCTION

 

 

 

FUNCTION IEnumString_Next ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL celt AS DWORD _

, BYVAL rgelt AS DWORD _

, BYREF pceltFetched AS DWORD _

  ) AS LONG
 

  ! push pceltFetched
  ! push rgelt
  ! push celt
  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+12]
  ! mov  FUNCTION, eax

 

END FUNCTION

 

 

NextItem

 

FUNCTION IEnumString_NextItem ( _
  BYVAL pthis AS DWORD PTR _

, BYREF elt AS STRING _

  ) AS LONG

  elt = ""
  LOCAL HRESULT AS LONG
  LOCAL pelt AS DWORD
  LOCAL wstrlen AS LONG
  CALL DWORD @@pthis[3] USING IEnumString_Next (pthis, 1, pelt, BYVAL %NULL) TO HRESULT
  IF pelt THEN
     wstrlen = lstrlenW(BYVAL pelt)
     IF wstrlen THEN elt = ACODE$(PEEK$(pelt, wstrlen * 2))
     CoTaskMemFree pelt
  END IF
  FUNCTION = HRESULT

END FUNCTION

 

 

Skip

 

FUNCTION IEnumString_Skip ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL celt AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IEnumString_Skip (pthis, celt) TO HRESULT
  FUNCTION = HRESULT
 

END FUNCTION

 

 

 

FUNCTION IEnumString_Skip ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL celt AS DWORD _

  ) AS LONG
 

  ! push celt
  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+16]
  ! mov  FUNCTION, eax

 

END FUNCTION

 

 

Reset

 

FUNCTION IEnumString_Reset ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[5] USING IEnumString_Reset (pthis) TO HRESULT
  FUNCTION = HRESULT
 

END FUNCTION

 

 

 

FUNCTION IEnumString_Reset ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+20]
  ! mov  FUNCTION, eax

 

END FUNCTION

 

 

Clone

 

FUNCTION IEnumString_Clone ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL ppenum AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[6] USING IEnumString_Clone (pthis, ppenum) TO HRESULT
  FUNCTION = HRESULT
 

END FUNCTION

 

 

 

FUNCTION IEnumString_Clone ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL ppenum AS DWORD _

  ) AS LONG
 

  ! push ppenum
  ! mov  eax, pthis
  ! push eax
  ! mov  eax, dword ptr[eax]
  ! call dword ptr[eax+24]
  ! mov  FUNCTION, eax

 

END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:24:03 +0200