Function : Text List Manipulation

ListAddEntry - Add a string to a text list.
----------------------------------------------------------------------------------------------------------

#include <textlist.h>

STATUS LNPUBLIC ListAddEntry(
DHANDLE hList,
BOOL fPrefixDataType,
WORD far *pListSize,
WORD EntryNumber,
const char far *Text,
WORD TextSize);

Description :

This function adds a string to a text list in memory, increasing number of entries in the list if necessary. This re-allocates the storage associated with the the text list to the original size plus the specified text size plus one more word for the entry length.

Parameters :

Sample Usage :

ListAllocate(0, 0, FALSE, &hList, &pList, &wListSize);
NumEntries = ListGetNumEntries(pList, FALSE)
OSUnlockObject(hList);

ListAddEntry(hList, FALSE, &wListSize,
             NumEntries,  
             "NewTextListEntry",
       strlen("NewTextListEntry"));
pList = OSLockObject (hList);

NSFItemAppend(hNote, ITEM_SUMMARY, FieldName,
              FieldNameLen, TYPE_TEXT_LIST,
              pList, wListSize);
OSUnlockObject(hList);
OSMemFree (hList);

See Also :

ListAddText
----------------------------------------------------------------------------------------------------------