- Reading the persistent values
- Various
- Windows Vista (and later)
INIRead (Function) In french: INILit
// Default choice read in the .INI nProduct is int = Val(INIRead("USER", ... "LastProd", "", fExeDir() + "\Port.INI")) IF nProduct > 0 THEN ListSelectPlus(LIST_Product, nProduct)
Syntax
<Result> = INIRead(<Section> [, <Keyword> [, <Not found> [, <File>]]])
<Result>: Character string - Text sought or list of keywords found in the section (the keywords are separated by CR characters),
- List of file sections (the sections are separated by CR characters).
- Content of <Not found> in the following cases:
- the string corresponding to the keyword is empty,
- the keyword is not found,
- the file is not found.
- Empty string (if <Not found> is not specified or if it is equal to an empty string) in the following cases:
- the string corresponding to the keyword is empty,
- the keyword is not found,
- the file is not found.
<Section>: Character string (with quotes) Name of section to read in the INI file. If this parameter and <Keyword> correspond to an empty string, <Result> contains the list of sections found in the file, separated by CR characters.
Note: This name cannot contain the "-" character.
Versions 17 and later New in version 17 <Keyword>: Optional character string (with quotes) Name of the keyword containing the information to read. If this parameter is an empty string, <Result> contains the list of keywords found in <Section>, separated by CR characters.
Versions 17 and later New in version 17 <Not found>: Optional character string (with quotes) Text to return if the requested keyword was not read. This parameter corresponds to an empty string by default.
Versions 17 and later New in version 17 <File>: Optional character string (with quotes) Full name of file to read (with its extension). - The WIN.INI file will be used if this parameter is not specified.
- If only the name of the file is specified, the specified file will be sought in the directory of Windows.
Versions 15 and later New in version 15 Versions 16 and later New in version 16 Versions 17 and later New in version 17 Remarks Reading the persistent values - To read in the registry, use the functions specific to the registry: RegistryQueryValue, ...
- The INI files are limited to 64 KB (in Windows 98).
- TSE: INIRead is using the Windows directory of the user by default.TSE: INIRead is using the Windows directory by default.
Caution: Until version 21, INIRead was using the Windows directory of the user by default. Reminder: In TSE mode, the access to a '.INI' file with a relative name is not recommended. We advise you to use one of the following solutions: The RegistryXXX functions are not available. If the INI file contains data containing spaces, this data must be enclosed between quotes. For example:
[MY SECTION] mydata = "My data containing spaces"
This page is also available for…
|
|
|
| |
| | EDT_Retorno_cStat=INIRead("EVENTO001","cStat","",EDT_localizacao_arquivo_retorno_carta) EDT_Retorno_nProt=INIRead("EVENTO001","nProt","",EDT_localizacao_arquivo_retorno_carta) //=== [EVENTO001] cStat=135 //BLOG COM VIDE E EXEMPLO
AULA 1312 WINDEV DICAS 048 INIREAD
http://windevdesenvolvimento.blogspot.com.br/2017/12/aula-1312-windev-dicas-048-iniread.html
https://www.youtube.com/watch?v=5F7zQU9sBYQ
|
|
|
|
| |
| |
| |
| |
| |
| |
| | |
|