INtime SDK Help
CfgParAddString

Add a string at end of section.

DWORD CfgParAddString(
CFGFILE cFile,
    LPCSTR  szSection,
    LPCSTR  szPar,
    LPCSTR  szVal
);

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, it may not be NULL or empty.
szVal
(in) Pointer to the new string. It should not contain enclosing quotes.

Return values

ECFG_OK for success or an error code on failure.

Remarks

Set a new string value at the end of the section.

Errors

ECFG_BADCFGFILE
File handle out of range or invalid
ECFG_MEM
There is not enough memory to expand the buffer
ECFG_NOTFOUND
Section name not found
ECFG_ALREADY
A parameter with this name already exists
ECFG_PARSEWARN
The parameter name is invalid
ECFG_WRONGFILETYPE
Wrong file type
See Also