INtime SDK Help
CfgSectionEnumerate

Enumerate next section.

DWORD Cfg(
CFGFILE cFile,
    LPCSTR  szSection,
    LPCSTR  szPar,
    LPSTR   pDest,
    int*    pLen
);

Parameters

cFile
(in) File handle retrieved by previous CfgFileOpen with argument CFG_SECTION as type.
szSection
(in) Name of section in which the parameter is searched.
szPar
(in) Name of parameter after which to look for the next parameter. May be NULL or an empty string, in which case the first parameter is located.
pDest
(out) Pointer to buffer to receive the name. The buffer must be at least *pLen characters long. The terminating zero is stored in the buffer, so there must be space for that.
pLen
(in, out) Pointer to a variable that is set to the size of the buffer before the call. On successful return, the variable now contains the length of the value (including terminating zero).

Return values

ECFG_OK for success or an error code on failure.

Remarks

Finds the first or next parameter in a section. In case of ECFG_LIMIT the pLen contains the size of buffer needed, nothing is copied to the buffer.

Errors

ECFG_BADCFGFILE
File handle out of range or invalid
ECFG_NOMORE
There are no more parameters in the section
ECFG_LIMIT
Size of buffer too small
ECFG_NOTFOUND
Section name not found
ECFG_NOTFOUND2
Parameter name not found
ECFG_WRONGFILETYPE
Wrong file type
See Also