.. highlightlang:: us .. index:: GetProfileString .. _getprofilestring: GetProfileString ================ .. us.tag GetProfileString ENGLISH uniplot-registry Changed310 Changed330 Changed5101 :ref:`GetProfileString` retrieves a string from the specified section in an initialization file or the Windows registry. .. function:: ssString = GetProfileString(ssSection, ssKey) ssString = GetProfileString(ssSection, ssKey, ssFileName) ssString = GetProfileString(ssSection, ssKey, ssFileName, ssDefault) .. us.return **Return Value** *ssString* is a scalar string to be read from the specified file. The string length is limited to 4095 characters. .. us.params **Parameters** .. uparam:: ssSection *ssSection* specifies the section containing the key name. The name of the section is case-independent; .. uparam:: ssKey *ssKey* is the key name of the associated string that is to be retrieved. .. uparam:: ssFileName *ssFileName* is a string that names the initialization file. If this string is empty (""), :ref:`GetProfileString` returns data from the Windows registry. .. uparam:: ssDefault *ssDefault* is a default string. If the key cannot be found in the initialization file or the Windows registry, :ref:`GetProfileInt` returns the default string. .. us.comment **Comment** UniPlot uses the key :file:`HKEY_CURRENT_USER\\Software\\RSB\\UniPlot5` in the Windows registry. .. us.example **Example** If the file :file:`d:/test.ini` contains the following text, :: [Section] Key=123 the call to GetProfileString returns the string ``"123"`` :: * ssString = GetProfileString("Section", "Key", "d:/test.ini"); .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.10.1 - A "esc:" prefix in the value is taken into account (see :ref:`WriteProfileString`) .. seealso:: :ref:`overview-files`, :ref:`WriteProfileString`, :ref:`GetProfileString_Policy` :sub:`id-1437791`