INtime SDK Help
CfgParSetString

Set parameter as a string.

DWORD CfgParSetString(
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.
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

Read the string value for a section/parameter. If there is no comment for the given parameter, the buffer is set to an empty string. 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_WRONGTYPE
The parameter is not a string.
ECFG_MEM
There is not enough memory to expand the buffer.
ECFG_NOTFOUND
Section name not found
ECFG_NOTFOUND2
Parameter name not found
ECFG_WRONGFILETYPE
Wrong file type
See Also