INtime SDK Help
CfgParGetString

Read parameter as string.

DWORD CfgParGetString(
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.
pDest
(out) Pointer to buffer to receive the string. 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

Read the string value for a section/parameter.

Errors

ECFG_BADCFGFILE
File handle out of range or invalid
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