Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetIni() need enhancement
Message
De
02/12/2003 22:07:12
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
GetIni() need enhancement
Divers
Thread ID:
00855280
Message ID:
00855280
Vues:
112
I have this function to read a value from an INI file:
* Return the value from an INI file
* expC1 Section
* expC2 Key
* expC3 INI file
FUNCTION GetIni
PARAMETER tcSection,tcKey,tcFile
PRIVATE lcBuffer,lnLocation
tcFile=IIF(TYPE('tcFile')<>'C',oApp.IniFile,tcFile)
lcBuffer=SPACE(40)+CHR(0)
=GetPrivateProfileString(tcSection,tcKey,'',@lcBuffer,LEN(lcBuffer),tcFile)=0
lnLocation=AT(CHR(0),lcBuffer)
IF lnLocation>0
   lcBuffer=SUBSTR(lcBuffer,1,lnLocation-1)
ENDIF
RETURN lcBuffer
However, if I have an INI file like this:
[WebService]
Url=https://www.mydomain.com/OPX_MyDir/Something.asmx
The value returned would stop at the _ sign. Anyone knows how to enhance the GetIni() function so it would grab the entire line?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform