LlEnumGetEntry

Syntax:

HLISTPOS LlEnumGetEntry(HLLJOB hJob, HLISTPOS hPos, LPSTR pszNameBuf, UINT nNameBufsize, LPSTR pszContBuf, UINT nContBufSize, _LPHANDLE pHandle, _LPINT pType);

Task:

Returns the name and contents of a variable or (chart) field.

Parameter:

hJob: List & Label job handle

hPos: The handle of the current field iterator

pszNameBuf, nNameBufsize: Buffer where the name should be stored

pszContBuf, nContBufSize: Buffer where the contents should be stored. pszContBuf can be NULL to ignore the contents string.

pHandle: Pointer to a handle where the handle value should be stored. Can be NULL to ignore the handle value. See LlDefineVariableExtHandle() and LlDefineFieldExtHandle().

pType: Pointer to an INT, in which the type (LL_TEXT, ...) will be stored. May be NULL to ignore the type.

Return Value:

Error code

Hints:

During the LlEnum...() functions, a call to LlDefineVariableStart() or LlDefineFieldStart() is prohibited!

The iterator functions can be used to enumerate variables and/or fields and to get their names, contents and types.

See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value.

Example:

The following example traverses the list of variables and prints all of them (LL_TYPEMASK is the constant for all possible variable types):

HLISTPOS hPos = LlEnumGetFirstVar(hJob, LL_TYPEMASK);
while (hPos != NULL)
{
   TCHAR szName[64+1];
   TCHAR szContents[256+1];
   LlEnumGetEntry(hJob, hPos, szName, sizeof(szName), szContents,
         sizeof(szContents), NULL, NULL);
   printf("%s - %s\n",szName,szContents);
   hPos = LlEnumGetNextEntry(hJob, hPos, LL_TYPEMASK);
}

See also:

LlEnumGetFirstVar, LlEnumGetFirstField, LlEnumGetFirstChartField, LlEnumGetNextEntry