Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I read .ini file entries??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00400961
Message ID:
00404014
Vues:
61
I use the following code; Hope help you

DECLARE INTEGER GetPrivateProfileString ;
IN WIN32API ;
STRING cSection,;
STRING cEntry,;
STRING cDefault,;
STRING @cRetVal,;
INTEGER nSize,;
STRING cFileName

lcInivalue=Space(20)
pcFileName="C:\mydirectory\myconfig.ini"

*- PcFileName must have the full path where the ini file is located
lnResult=GetPrivateProfileString([DATA],"Path","*None*",;
@lcIniValue,LEN(lcIniValue),pcFileName)

******
* myconfig.ini
*[DATA]
*path=C:\dbfs\
*temp=C:\temp\
*[Others}
*

*- lcInivalue will return c:\dbfs\
Juan C.
"Anyone who has never made a mistake has never tried anything new." A.E
"The important thing is not to stop questioning. Curiosity has its own reason for existing." A.E
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform