WriteProfileIntΒΆ

WriteProfileInt copies an integer number into the specified section of an initialization file.

bool = WriteProfileInt(ssSection, ssKey, rsVal)
bool = WriteProfileInt(ssSection, ssKey, rsVal, ssFileName)

Return Value

bool The return value is TRUE (1), if the function is successful, otherwise, it is FALSE (0).

Parameters

ssSection

ssSection is a scalar string that specifies the section to which the string is to be copied. If the section does not exist, it is created. The name of the section is case-independent.

ssKey

ssKey is a scalar string containing the entry to be associated with the string. If the entry does not exist in the specified section, it is created. If this parameter is an empty string, the entire section, including all entries within the section, is deleted.

rsVal

rsVal is a scalar integer to be written to the specified file.

ssFileName

ssFileName is a string that names the initialization file.

Example

WriteProfileInt("Section", "Key", 123, "test.ini")
[Section]
Key=123

id-240295