AddCollectionItem method


Prototype

AddCollectionItem Proto hHandle:HANDLE, lpszString:LPSTR

Syntax

Invoke AddCollectionItem, hHandle, lpszString

Function

Adds a new item (string) to a collection.

Parameters

hHandle

Handle to the collection.

lpszString

Pointer to the effective address of the null-terminated string to be added.

Return value

Eax returns the zero-based index of the added string in the collection.


REMARKS: If the collection was created with the bSorted parameter set to TRUE (see the
CreateCollection method) the string is inserted into the collection and the collection is sorted. Otherwise, the string is added to the end of the collection.


REMARKS: The AddCollectionItem method will add lpszString as a Unicode string if the application is running as Unicode, or as an ANSI string if not (see the IsAppUnicode method). You can call AddCollectionItemA to add ANSI strings, or AddCollectionItemW to add Unicode strings.