GetCollectionItem method


Prototype

GetCollectionItem Proto hHandle:HANDLE, lItem:LONG, lpszBuffer:LPSTR

Syntax

Invoke GetCollectionItem, hHandle, lItem, lpszBuffer

Function

Gets the content of an item (string) from a collection.

Parameters

hHandle

Handle to the collection.

lItem

Zero-based index of the item to be retreived.

lpszBuffer

Pointer to a buffer that will received the item content. The buffer must have sufficient space for the string and a terminating null character.

Return value

Eax returns the length of the string, in characters, excluding the terminating null character.


REMARKS: If lItem does not specify a valid item, the return value is -1.


REMARKS: The GetCollectionItem fills lpszBuffer with a Unicode string if the application is running as Unicode, or with an ANSI string if not (see the IsAppUnicode method). You can call GetCollectionItemA to get ANSI strings in Unicode applications, or GetCollectionItemW to get Unicode strings in ANSI applications.