WriteProfileString¶
WriteProfileString writes a string into the specified section of an initialization file or the Windows registry database.
-
bool = WriteProfileString(ssSection, ssKey, ssString)
-
bool = WriteProfileString(ssSection, ssKey, ssString, 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.
-
ssString
ssString is a scalar string to be written to the specified file. The string length is limited to 16384 characters.
-
ssFileName
ssFileName is a string that names the initialization file. If the file does not exists, it will be created. If ssFileName is not specified the data is saved in the Windows registry in the key
HKEY_CURRENT_USER\Software\RSB\UniPlot5
.
Example
WriteProfileString("Section", "Key", "Test", "d:/test.ini")
[Section]
Key=Test
History
Comment
If the INI-file is a UNICODE file with a BOM, the strings are saved as UNICODE strings, otherwise strings are saved as ANSI text. By default UniPlot creates ANSI files. An ANSI file can be converted to a UNICODE file using notepad.exe.
History
Version | Description |
---|---|
5.10.1 | If the parameter ssString contains characters with a code smaller than 0x20 (blank) for exampel a newline character the string is written as an escape sequence. In this case the string starts with “esc:”. |
See also
id-1988435